Rick Strahl's Weblog
Rick Strahl's FoxPro and Web Connection Weblog
White Papers | Products | Message Board | News |

Last 100 Posts


Deploying and Configuring West Wind Web Connection Applications


7 days ago

Need to know how to publish a Web Connection application to a new Web Server? This article takes you end to end through all the steps from setting a new Virtual Machine Server, to installing the Web Server, configuring the machine and setting up your Web application. If you're coming from an older version of Web Connection pre-7.0 you'll find that the process is a lot more automated than it has been in the past.

Read More...

wwDotnetBridge: Getting and Setting COM Unsupported Values with ComValue


2 months ago

ComValue is a useful helper class in wwDotnetBridge that provides a wrapper around .NET Values that otherwise would not be accessible to FoxPro due to COM value incompatibilities. ComValues can be passed into .NET methods and are returned as result values for wwDotnetBridge's intrinsic indirect access methods. In this post I describe how ComValue works and why we need it in the first place.

Read More...

West Wind Web Connection 7.08 Release Notes


3 months ago

West Wind Web Connection 7.08 is here. This is a small maintenance release with a number of bug fixes and a few small feature enhancements.

Read More...

Using FoxPro to Connect to an Azure SQL Database


4 months ago

You can use FoxPro's SQL Server connectivity to connect to Microsoft's SQL Azure. This post describes a few things you have to do set up your application to work with Azure's SQL Server implementation which requires a little extra configuration work.

Read More...

Web Connection 7.06 Release Notes


6 months ago

Web Connection 7.06 release notes. This is a maintenance release with a couple of cool new development time feature enhancements for Live Reload and an updated Launcher.

Read More...

Web Connection 7.05 Release Notes


7 months ago

Web Connection 7.05 is here! This release is primarily a maintenance release that has a few small fixes and a few performance enhancements. But there are also a number of pretty cool new features that I'm pretty excited about. In this post I'll dig into some of the new features with more detail.

Read More...

Building a Web Connection Live Reload Server


7 months ago

Live Reload is usually a client side only feature that provides the ability to make changes to client side web code - HTML, CSS and JavaScript - and have those changes immediately reflected in the browser. Web Connection provides a Browser Sync based implementation, but until v7.05 server based changes still required manual refreshes. In this post I'll describe a new 7.05 and later feature that allows you to automatically restart your Web Connection server when a code change is made and - if combined with Browser Sync - also refreshes the currently active browser page.

Read More...

API Declarations in Performance Sensitive FoxPro Code


7 months ago

The FoxPro Declare API has been in FoxPro forever, but did you know that the actual step of calling DECLARE has significant performance overhead that often is much slower than the actual API calls? I recently ran into this checking out a third party library and decided to some closer examination and found some nice ways to speed up some of my existing API calls by separating (or static loading) declarations from invocations.

Read More...

Web Connection 7.02 has been released


10 months ago

Web Connection 7.02 is here and this post provides a detailed look at most of the new features included in this maintenance update.

Read More...

Marking up the World with Markdown and FoxPro


Dec 17, 2018

This post contains my session notes for the Southwest Fox 2018 session **Marking up the World with Markdown**. This article provides an overview of what Markdown is and why it is useful for generic writing tasks as well as for integration into FoxPro or Web applications. Markdown is immensely popular these days as a text entry format and in this post you learn how you can easily use it from your own FoxPro and more importantly why you might want to use it in the first place.

Read More...

Web Connection Security


Dec 10, 2018

Security is hard especially for Web applications and configuration. This post is the White Paper for my Southwest Fox session on Web Connection Security and covers a wide range of internals of how IIS and Web Connection interact and how to configure both system level and application level security for your FoxPro Web Connection applications.

Read More...

West Wind Web Connection 7.0 has been released


Nov 15, 2018

Web Connection 7.0 is and here is a detailed post that goes into some detail of many of the new and enhanced features in this new release

Read More...

Using Browser-Sync to live refresh Server Side HTML and Script Changes


Oct 9, 2018

Live reloading is common in client side applications, but server side applications generally don't have the ability to automatically reload when a server side change is made. But there are tools that allow you to monitor your local development Web server - even non-NodeJs based ones - and can automatically reload the active page when a change is detected. In this post I look at how to use Browser Sync to be more productive

Read More...

Fixing Windows Downloaded File Blocks and wwDotnetBridge


Sep 22, 2018

I'm happy to say that I've found a workaround for the nasty problem with wwDotnetBridge and not being able to load `wwdotnetbridge.dll` due to Windows file blocking for files or archives downloaded from the Internet. In this post i describe why files are blocked and how you can unblock them including a new solution that is fast and can be done from within a running application.

Read More...

Testing a Web Connection COM Server with FoxPro or PowerShell


Aug 15, 2018

If you run into problems with a Web Connection COM Server one of the first things you need to do is ensure that the server is properly registered and working on the Windows installation. In this post I look at using both Visual FoxPro and PowerShell to load and test to see whether a Web Connection server is installed and able to return a result.

Read More...

Web Connection 6.21 is here


Jun 14, 2018

Web Connection 6.21 has been released. This is a small maintenance release that fixes a few small bugs and makes a few small performance tweaks. There are also a couple of new features: wwDotnetBridge Event handling for .NET Objects, new .NET Runtime Loader with better error reporting and a new Console Configuration task to fix the annoying Loopback Check that can prevent server local Windows account authentication.

Read More...

IIS Server Authentication and Loopback Restrictions


Jun 14, 2018

If you've ever run into a problem on a Windows Server and weren't able to run a local browser and try to log in using your local network Windows credentials you might have found out the long way that your credentials are not working by default. Recently Windows 10 also seems to have enabled this policy and I noticed local Windows account log ins not working. This comes from a local Loopback access policy. In this post I describe what fails and how you can work around it both for Web Connection applications and manually.

Read More...

Startup Error Tracing in West Wind Web Conection 6


Jun 8, 2018

One of the most common questions with Web Connection that come up are related to startup errors that cause File or COM Servers to fail during startup. These errors have been difficult to debug in the past but with Web Connection 6+ a number of improvements make it easier to avoid errors in the first place, and track them down if you do have them. In this post I go into detail on the Startup sequence of Web Connection.

Read More...

Web Connection and TLS 1.2 Support


4 comments
Mar 1, 2018

This week Authorize.NET switched of support for TLS 1.0 and 1.1, requiring all clients to use TLS 1.2. No surprise this was announced two years ago, but as is often the case two years is a long time away and so many were still caught off guard if you're running an oldish version of Windows. In this post I look at what versions of Windows don't support TLS 1.2 and how you can enable TLS 1.2 in those versions that didn't originally have support but can enable it. Unfortunately there are also several versions of Windows that don't support TLS 1.2 and we'll cover that too.

Read More...

Locking down the West Wind Web Connection Admin Page


Feb 5, 2018

The West Wind Web Connection Admin page is the starting point for Web Connection Server Instance administration. But this page allows a number of administrative operations that should only be accessible by a properly authenticated user. I've been notified on many occasions that people have found wide open Admin pages and this post describes how to make sure your Admin pages are properly locked down

Read More...

West Wind Web Connection 6.18 released


Jan 10, 2018

West Wind Web Connection 6.18 has been released. It's a small release with only one major feature update in the way of bringing back Apache support for Apache 2.4. Here's more info what's new.

Read More...

Shutting down file-based Web Connection Instances with WM_CLOSE Messages


Jan 5, 2018

There are a number of issues related to shutting down specific instances of Web Connection servers remotely. Because of the way instances are managed there are difference between file and COM mode operation because file mode instances are not managed by a centralized manager. However with a few tricks you can trigger shutdown operations in a Web Connection server by hooking into Windows Events with BINDEVENT(). Here's how.

Read More...

West Wind Web Connection 6.17 released


Oct 15, 2017

West Wind Web Connection 6.17 has been released. This post goes over the changes in more detail. This is a maintenance release with a few bug fixes and some minor feature updates.

Read More...

Calling async/await .NET methods with wwDotnetBridge


Oct 10, 2017

More and more .NET APIs expose Async only interfaces and it might seem that calling `async` `await` code from FoxPro seems like it would be difficult. I had my doubts it would but as it turns out it does. In this post I describe how `async` `await` works in .NET and how the lower Task API is used to implement it, and more importantly how we can call async methods using the .NET Task API.

Read More...

Web Connection 6.15 is Here


Jul 15, 2017

Web Connection 6.15 has been released and this post gives a lot more details on the new features of this update. This release is primarily focused on server loading and debugging improvements with a few relatively small but significant enhancements that improve load performance and make it easier to debug startup errors.

Read More...

New Web Connection Server Startup Features in 6.15


Jul 1, 2017

Debugging startup issues has always been notoriously difficult in Web Connection. Starting with the forthcoming v6.15 Web Connection adds better error reporting that brings up an error page on failures and provides an easier way to log trace commands to a log file.

Read More...

GAC Assemblies with wwDotnetBridge


May 22, 2017

wwDotnetBridge makes it easy to load up .NET assemblies and reference to access contained classes and other types. Standalone assemblies can be loaded easily enough by filename, but assemblies that live in the GAC should be referenced by their fully qualified assembly name. Here's how.

Read More...

Persisting Static Objects in Web Connection Applications


1 comment
Apr 4, 2017

One of the cool things about Web Connection is that Web Connection servers are persistant instances that can cache static data for subsequent requests. Besides the internal data caching FoxPro can do on an already running instance, you can also attach custom state to the server instance. In this post I'll show a number of approaches of how to access persistant object state on the server instance

Read More...

Controlling the JSON.NET Version in wwDotnetBridge with Assembly Redirects


Mar 20, 2017

JSON.NET is the most popular .NET component used in more components than any other and because of that you can end up finding other components that also use JSON.NET and perhaps with a different version. Trying to load a different version of JSON.NET in an application can cause runtime failures for loading the assembly. The workaround is to use .NET Assembly Redirects in the application's .config file. Here's how to do this.

Read More...

Creating Truly Unique Ids in FoxPro


Feb 13, 2017

Generating ids is a common thing for any Database applications. Whether it's for unique identifiers to records in a database, whether you need to send a unique, non-guessable email link to a customer or create a temporary file, unique IDs are common in software development of all kinds. In this post, Rick talks about how to generate unique ids in FoxPro.

Read More...

Web Connection 6.10 Release Notes


Feb 1, 2017

West Wind Web Connection 6.10 has been released and here's a detailed run down on all the improvements and new features in this new maintenance release version.

Read More...

Syntax Errors in the FoxPro Editor caused by Extended Characters


Jan 25, 2017

The FoxPro editor is prone to allow extended cahracters into the editor - some of which may be invisible and can cause some really nasty compiler bugs that are 'invisible'. Here's an example how that happened to me and how it caused me to think I'm going nuts.

Read More...

Route Web Connection Scripts, Templates and Pages to a single Process Class


Jan 15, 2017

Web Connection supports automatic extension mapping to a single route handler by default. This typically means you can route a single extension to a single type of processing mechanism like the Script or Template engines or the Web Control Framework. However, the default behavior is easily overridable by explicitly overriding the script mode in OnProcessInit(). Here's how.

Read More...

Visual Studio Gets Support for FoxPro Files


3 comments
Nov 16, 2016

A new Visual Studio extension allows you to open FoxPro files right in Visual Studio with syntax color highlighting which makes working with Web Connection code a lot cleaner as you can keep code windows open right alongside your HTML markup pages.

Read More...

Custom Row and Column Rendering in Web Connection with HtmlDataGrid()


Jun 30, 2016

DataGrids are popular for displaying lists of data and while I discourage people from excessively using DataGrids for storing data, many people do build complex and visual grids. The HtmlDataGrid() Html Helper in Web Connection provides a lot of flexibility for rendering custom column content as well as allowing for easy customization of each row and column's styling and formatting.

Read More...

Calling JSON REST Services with FoxPro and wwJsonServiceClient


9 comments
May 26, 2016

Calling JSON REST services is becoming more and more common and although various West Wind tools have provided support for calling services using wwHttp and wwJsonSerializer, the newly released wwJsonService class provides an even easier service call wrapper for calling JSON REST service endpoints. In this post I demonstrate basic functionality using the CallServiceMethod() method as well as properly abstracting all service calls into a dedicated class.

Read More...

Web Connection 6.0 RTM is here


Apr 4, 2016

Web Connection 6.0 RTM is finally here and there's a lot of new stuff to check out. While a lot of new features have been added backwards compatibility has been maintained, with only very minor changes if any required for some applications. This post is an inaugrial that goes through a number of the the major features and describes them in some detail.

Read More...

Outlook Email Automation–Watch out for Administrator Access


Nov 29, 2015

Today I ran into a problem with Outlook COM Automation which didn't allow me to access an existing running Outlook instance via GETOBJECT(). Turns out running as Administrator was causing the problem.

Read More...

String Tokenizing based on StrExtract()


2 comments
Nov 19, 2015

I've been doing a bunch of string parsing in the last few weeks as part of new Html Help Builder and Web Connection features and one thing I've repeatedly run into is the need to parse strings and tokenize subsections of strings for temporary exclusion for other processing. In this post I describe a couple of useful helpers that save a lot of time extracting string values and tokenizing a string for post processing.

Read More...

Conference Materials from Southwest Fox


Oct 20, 2015

I've posted my session notes for Southwest Fox. This post contains links to samples, slides and white papers on SOAP Web Services, Mobile and Angular Web applications.

Read More...

Web Connection 6.0 Feature: New Project Server Configuration Script


Oct 9, 2015

Web Connection 6.0 introduces a new MyApp_ServerConfig.prg file that is generated with new projects that can automatically configure your Web site with IIS. The Fox code can be modified but by default works to configure a Web site. You can compile the PRG into its own EXE file or embed it as part of your server via command line switch.

Read More...

An Updated Web Connection Add-in for Visual Studio 2015


1 comment
Aug 4, 2015

Visual Studio 2015 has changed a number of internal APIs that make using the old Web Connection Add-in no longer work. To support VS2015 I've created a new VSIX based add-in that does and provides a few new features and enhancements in the process.

Read More...

Clicks not working in Internet Explorer Automation from FoxPro


1 comment
Jul 19, 2015

Starting with IE 10 and later, COM Automation from FoxPro causes certain events to no longer be triggered from FoxPro code. Due to the DOM compliance mode in IE 10 and later it appears that DOM access is case sensitive and FoxPro unfortunately doesn't support case sensitive COM calls. In this post I show why this is a problem and provide a couple of work arounds.

Read More...

Drive Mapping in Web Applications


1 comment
Jun 28, 2015

Errors with drive mapping can cause major headaches in Web applciations hosted in IIS because the IIS envrionemnt often obliterates existing drive maps that you might expect to be there. In this post I explain how mapped drives work inside of a system context and show a few ways that you can ensure that your drives map properly before your application starts and runs into a problem.

Read More...

Visual FoxPro and Multi-Threading


2 comments
Jun 18, 2015

Using multi-threaded Visual FoxPro components often comes up for discussion and there's lots of confusion on how FoxPro's multi-threading features actually work and how they can and cannot be used effectively. In this post Rick describes how MTDLL components work and where they work well as well as what they can't do.

Read More...

A Preview of Features for Web Connection 6.0


3 comments
Jun 7, 2015

I've started putting together some new features and updates for Web Connection 6.0 that are coming together nicely. Here's a preview of some of the features as well as a discussion of some other things to come.

Read More...

Single File Image Uploads with plUpload and Web Connection


Apr 20, 2015

Web Connection has included plUpload support for a while, but it uses the hefty plUpload Queue component which provides a rich UI. If your needs are simpler, you can also use the raw programmatic plUpload API directly to handle uploads. In this post I show how the new image uploader on the West Wind Message Board is implemented using the raw plUpload base client API and Web Connection's plUploadHandler.

Read More...

Access-Control-Allow-Origin Header in West Wind Web Connection


Apr 2, 2015

When trying to access Web Connection served JSON data from mobile device applications or from Web applications hosted on other domains you might have found that you run into Cross-site access restrictions of the XHR calls that don't allow the cross site calls. Luckily there's an easy work around using the CORS protocol that allows your server to specify which domains it allows to access your content.

Read More...

Use wwJsonSerializer to create Sample Data


Dec 18, 2014

When creating Sample code it's often tedious to create sample data structures in code. In some situations using a JSON string and then encoding the string to JSON can save some time and make it much easier to visualize the data structure that's being built.

Read More...

Visual Studio Community Edition–Visual Studio for Web Connection


Dec 16, 2014

Microsoft recently released a community edition of Visual Studio that is essentially a full, non-restricted version of Visual Studio Professional. The community edition is available to most developers in small to medium sized business and public organizations for free. If you're doing Web development, or specifically using Web Connection and the Web Control Framework, be sure to check out Visual Studio's Community Edition.

Read More...

SSL Vulnerabilities and West Wind Products


Oct 15, 2014

In light of today's SSL POODLE vulnerability announcements I've been inundated with questions regarding security in Web Connection and wwHttp. In this post I go over a few of the things to check and whether they affect any of your West Wind products indirectly.

Read More...

Figuring out Web Connection Versions


Sep 26, 2014

In recent months I've been getting a number of questions regarding web connection versions. What version should I be using, do I need to install this small update and more often than not, how can I check for the Web Connection version easily especially in a running applicaiton. In this post I describe the various places where Web Connection exposes version information and then suggest how to keep up to date.

Read More...

Creating .DLL Script maps with the Web Connection .NET Managed Module


Jul 20, 2014

Many old applications are being migrated to newer versions of IIS and for these newer versions we recommend using the managed module. However, many old applications are still stuck referencing the wc.dll ISAPI extension directly instead of using script maps. It turns out you can use .DLL as a script map extension with the .NET module. This post shows you how and why this is a good idea to go on IIS 7 and later if you absolutely must stick to explicit wc.dll usage.

Read More...

UTC Time in FoxPro


7 comments
Jun 9, 2014

Date processing especially in Web applications can become problematic if people from different timezones access the application. UTC dates solve this problem but FoxPro doesn't have native support. In this post I look at how UTC dates solve many date issues and how you can use UTC dates easily from FoxPro with a couple simple helper functions.

Read More...

Showing a Wait Message when submitting longer Requests


1 comment
Feb 11, 2014

Form submissions to long running requests can be a problem in Web apps as users tend to be impatient and walk off or worse resubmit forms. To avoid this a little bit of JavaScript capturing onsubmit event of the form can go a long way to improve user experience with very little extra code, using the Web Connection client script library.

Read More...

wwFtp and WinInet Problems with IE 11


8 comments
Nov 25, 2013

Looks like IE 11 has introduced a WinInet bug for the FTP client that causes random failures due to Ftp message parsing. The end result is that in some situations wwFTP send operations can break. Here's what the problem is and a few workarounds you can try to get around them.

Read More...

Fixing wwDotnetBridge "Unable to load Clr Instance" Errors


4 comments
Oct 24, 2013

When you get "Unable to load Clr Instance" Errors while trying to load wwDotnetBridge, look for an unfortunate but simple to fix security issue with Windows. Here's how to get around this error.

Read More...

Publishing your Web Connection Web site from Visual Studio


Oct 13, 2013

Visual Studio includes a Web Deploy feature that makes it easy to publish content from your projects to a live Web site. Until recently you couldn't do this with Web Connection content, but since VS 2012 Update 2 you can now publish from Web Site Projects. Here's all you need to know on how to publish and organize your project for publishing.

Read More...

Web Connection Tip: Virtual Path Resolving with ~/


Mar 31, 2013

Making sure that all links and css and script references are linked relatively in your application is crucial. Page relative paths work great, but sometimes you need to use virtual relative paths from within code or components that don't have generic access to the current page path. Web Connection supports automatic fixup for ~/ based paths to replace the virtual path - take advantage of it. Here's how.

Read More...

wwDotnetBridge and .NET Versions


Feb 25, 2013

wwDotnetBridge supports explicitly specifying which version of the .NET Runtime is loaded. But only one version of the runtime can be loaded into the FoxPro application process, and so the first wwdotnetbridge load wins. Here's how loading works and how you can ensure you're loading the right version for your application.

Read More...

Using IIS Express with West Wind Web Connection


Dec 10, 2012

Web Connection 5.65 adds support for running Web Connection sites on IIS Express, which is a self contained, installable and very small version of IIS that can be run on most Windows machines with minimal to no configuration. It's a great way to develop locally without a full copy of IIS. Here's more on what you need to know.

Read More...

SouthwestFox Sessions Slides, Samples and Links


Nov 16, 2012

I've posted my session white papers, slides and examples from the Southwest Fox conference last month. My two sessions where FoxPro and .NET Interop related and covered a few new recent developments that have improved the ease with which Interop can be done.

Read More...

wwDotnetBridge for FoxPro .NET Interop is now Free and Open Source


6 comments
Sep 27, 2012

wwDotnetBridge is a FoxPro library to help with accessing .NET functionality from Visual FoxPro is now free and open source.

Read More...

Custom Manifest Files in Visual FoxPro EXEs


12 comments
Aug 25, 2012

Unbeknowst to me FoxPro allows easy creation of custom Windows Manifests when building EXE applications. Simply creating a manifest file and putting it in the same folder as the project file allows easy embedding of custom manifests into FoxPro EXE files. Here's how.

Read More...

UTF-8 Encoding with West Wind Web Connection


1 comment
Aug 13, 2012

UTF-8 Encoding is ubiquous on the Web and with good reason: It simplifies display of extended characters in a consistent manner that's easily handled by browsers and non-visual HTTP clients. Although not the default encoding format, UTF-8 encoding is easily configured in Web Connection with a couple of commands. Here's how.

Read More...

Extensionless Urls with Web Connection and the IIS UrlRewrite Module


Aug 2, 2012

The question of how to implement extensionless URLs with Web Connection has come up frequently in recent months. This post describes what extensionless URLs are and describes one implementation using the IIS UrlRewrite Module that you can plug into your Web Connection applications today.

Read More...

FoxPro EXE DCOM Configuration on 64 Bit Systems


4 comments
Jul 23, 2012

FoxPro 32 bit EXE COM Servers don't show up in the default DCOMCNFG Component Manager. Here's how you can view your DCOM settings for a VFP COM server anyway by viewing the 32 bit DCOM manager.

Read More...

Root Path Support with ~ in Web Connection Response Output


May 12, 2012

Web Connection includes a small but unobvious feature that can properly fix up virtual paths. Here's how it works and why you should take advantage of it.

Read More...

Global Values in Web Connection


4 comments
Feb 23, 2012

A question that frequently comes up is how to store 'global' data in Web Connection. While global data generally is a bad idea, there are a number of ways that you can store global data in Web Connection without resorting to the undesirable use of PUBLIC variables. Here's how.

Read More...

Creating Gravatar Web Image Avatars in FoxPro


2 comments
Feb 2, 2012

Gravatar is a great Web Service based way to associate an images with user accounts that are based on email addresses. It's easy to use and can provide a nice touch of personalization with very little effort. This post shows how you can use Gravatar from within your FoxPro based applications.

Read More...

Transparent Bitmaps on Buttons and other Controls


8 comments
Jan 26, 2012

By default Visual FoxPro doesn't do a good job of using transparent image resources on controls. With a little bit of effort however you can make your UI work properly with transparent images. Here's how.

Read More...

How to work around Visual FoxPro's 16 Megabyte String Limit


8 comments
Jan 19, 2012

FoxPro has a 16meg string limit, but with a little bit of trickery it's possible to work past these issues and create strings larger than 16 meg strings. Here's how.

Read More...

SetFocus() in Form Init() kills @K Select All Formatting on Textboxes


1 comment
Jan 4, 2012

Ran into a small issue today that deals with @K not working when using SetFocus() in the Init() of a form. Apparently SetFocus() causes selections to not be made during form startup. Here's the issue and a couple of simple workarounds.

Read More...

ClassIDs in Visual FoxPro COM Projects


1 comment
Nov 26, 2011

Creating Visual FoxPro COM objects is pretty easy and painless. But on occasion there can be problems with COM registration due to the way FoxPro projects manage COM ClassIDs. Here are some of the issues and some easy tips on how to avoid problems.

Read More...

Dropping in MetaWeblog Provider into my FoxPro Weblog


Nov 21, 2011

For a while I've been slacking on my FoxPro blogging. Part of the reason has been that I'm spoiled - spoiled by using Windows Live Writer on my main Weblog (where I post most of my .NET and general...

Read More...

Doing .NET COM Interop with FoxPro? You need a .NET Disassembler


2 comments
Nov 17, 2011

If you're doing any sort of Interop with .NET, it's extremely useful to have a .NET disassembly like Reflector, JustDecompile or ILSSpy at hand to let you discover the functionality available in the assemblies you are interacting with in .NET. You can find out full type names required for instantiation, the exact method signatures for methods to call, and easy navigation to follow parameter names to actual type implementations. .NET disassemblers make Interop discovery much easier to work with.

Read More...

Writing to the Windows Console from Visual FoxPro


7 comments
Nov 7, 2011

It's not the first time this has come up for me: I need to have a FoxPro application that writes out to the Windows console when running in 'command line mode'. Unfortunately there's no real clean way to do this as Windows applications don't support console output. In this post I demonstrate how you can actually create console output from FoxPro, although it's not all that useful since the console output is terminated before any FoxPro code runs. I show what works and what doesn't along with a workaround solution by using an external application to handle console output.

Read More...

Form Submissions and Request Redirection in the Web Control Framework


Oct 25, 2011

A question that frequently comes up is how to handle page transitions in the Web Control Framework. By default WCF pages use Postback style submissions that always post back to the same page, it's sometimes not obvious how to move to the next page when a form submissions and operation is complete. Here are a few scenarios and how you can effectively move to other pages using the Web Control Framework

Read More...

Determining if a User is an Administrator


Oct 15, 2011

With Windows 7 and Vista User Access Control places a number of restrictions on desktop applications. In some scenarios it's simply necessary to override the default behavior and require to run as an administrator. Here's how you can use FoxPro code to quickly check for Admin rights.

Read More...

Running Ghostscript with Web Connection/Client Tools on a 64 bit Machine


Sep 6, 2011

Ran into a small problem today with the wwGhostscript class on a 64 bit machine. It just wouldn't work due to a simple problem: Installed the wrong version of Ghostscript which doesn't work with 32 bit FoxPro applications. Here's a detailed look at what the problem is and the easy fix to work around it.

Read More...

Web Connection Training at Southwest Fox


Aug 22, 2011

There's another West Wind Web Connection training seminar coming up at Southwest Fox this year on October 25th and 26th. Need a little extra motivation to come to an a training event like this? Here are a few more insights that explain why this training is a fun experience that's a worthwhile expense.

Read More...

Handling Multiple Screens in Visual FoxPro Desktop Applications


5 comments
May 15, 2011

Storing Window locations for applications is a common desktop application feature and it's easy enough to implement. If you have multiple monitors however and one of those monitors gets removed things can get tricky. Here's how you can detect changes to monitors in Visual FoxPro and properly size up your forms in the face of monitor removal

Read More...

Unwanted Macro Expansion in FoxPro Class String Properties


1 comment
Dec 31, 2010

Ran into a weird issue today with a string that contained an & in a URL in a string class property. The property would macro expand the ampersand from within the string constant assigned to the class header. This appeads to be a bug in the VFP code parser resulting in some interesting behavior.

Read More...

Running AJAX Requests in Web Connection 5.0 with Classic Request Processing


Aug 17, 2010

Web Connection 5.0's AJAX features were originally designed for the new Web Control Framework with controls that make using the AJAX features very simple. However you can also use these features from class wwProcess method and classic script/template pages with only a little extra effort using Web Connection's jQuery functionality and extensions. Here's how.

Read More...

Playing Media via Media Player Automation


4 comments
Apr 20, 2010

This short entry shows a couple of ways how you can play media content from your FoxPro applications using ShellExecute and Windows Media Automation.

Read More...

Understanding wwServer::lUnattendedComMode


6 comments
Dec 29, 2009

wwServer::lUnattendedMode in Web Connection provides automated SYS(2335) support for Web Connection requests. This entry describes what SYS(2335) does and why it is quite useful in Web Connection applications.

Read More...

Root-Relative Paths (~/path) in Web Connection


7 comments
Dec 10, 2009

Root relative paths allow you to create location independent urls that work regardless from where within the application they are called. This means you can use a url with root-relative path syntax and get consistent results in any directory of the application which makes the url portable – easy to copy and/or use in other pages without changes. Web Connection supports root-relative paths in various ways. Here’s how.

Read More...

Updated Web Connection Web Control Framework Training Videos


Sep 27, 2009

I have recently update the Web Connection video tutorials on the site to the latest version of the latest version of Web Connection. The new videos are completely up to date to the current version of Web Connection, somewhat more detailed than the original videos and provided in higher resolution and audio quality. you can also view these videos onlin.

Read More...

A few Thoughts on Web Connection and Security


Apr 29, 2009

Security is an important topic that's unfortunately addressed way too late in the development process many times. I can attest to that personally. Recently there have been a few questions regarding a security bulletin that points out a couple of vulnerabilities in Web Connection, that have been fixed since, but are worth going over again especially in light of older versions that might not have been updated to the latest shipping releases of Web Connection.

Read More...

COM Interop and .NET Guids


Apr 9, 2009

Guid values in .NET are unfortunately not directly accessible in VFP via COM interop because the type is not marshalled in a meaningful way over COM for VFP to consume. You get an error when trying to access a Guid value. This is a common problem for Value types marshalled over COM. In this post I'll describe a way around this by way of an intermediary function to intercept method calls and convert parameters and return values into something that can be consumed in FoxPro.

Read More...

Web Connection Version Updates and Compilation


6 comments
Feb 20, 2009

Several people have run afoul a recent Web Connection version update. All of the issues come back to proper recompilation of the PRG files distributed with Web Connection and in this post I review the steps for proper recompilation of the Web Connection files after a version update and why it is necessary.

Read More...

Important Bug Fix Regarding Cookies in Web Connection


5 comments
Jan 4, 2009

After December 28th, 2008 a number of people have been seeing problems in their Web Connection applications due to permanent Cookies not saving properly. This typically manifests in Session objects not keeping Session state properly or any code that uses custom, permanent cookies. This post outlines the problem and how to fix it.

Read More...

Javascript and jQuery Intellisense in Web Control Pages


Oct 12, 2008

Visual Studio provides fairly decent Intellisense and with a little bit of tweaking of your pages you can get Intellisense for jQuery and the Web Connection client script library.

Read More...

Watch out for SYS(2335) in non-COM Applications


1 comment
Oct 4, 2008

SYS(2335) can have some unexpected side effects if it is activated in non-COM applications even though the documentation states that in non-COM applications it is ignored.

Read More...

Header Manipulation in the Web Control Framework


Sep 21, 2008

Header access via is currently not supported in the Web Connection Web Control Framework, but that doesn't mean that you can't manipulate the header fairly easily. Using Expressions is one way that works today. In the next update there will also be an explicit Header object that allows dynamically adding content to the header that the top or bottom more easily.

Read More...

Partial Control Rendering in AJAX Callbacks


Sep 17, 2008

Partial Rendering in AJAX callbacks allows you to create AJAX requests very quickly by reusing the HTML server side controls already produce. Web Connection makes partial rendering very easy simply by calling the .Render() method on any control on the page and returning HTML. In this example I demonstrate how to update a grid and an error display dialog in a single AJAX callback.

Read More...

Running Web Connection on Windows Server 2008 64 Bit


Aug 16, 2008

I've just got done upgrading my server to Windows 2008 64 bit and the process of getting Web Cinnection to run on it was pretty painless. A few improvements in IIS 7 make it easy to dial the 32 bit functionality of IIS to the Web Connection application. Here's how it works.

Read More...

Http File Uploads in Classic and Web Control Framework Web Connection


Jul 31, 2008

File uploads are an operation that trip up Web developers frequently because the process of uploading files changes the rules of typical form behavior a little. Web Connection makes the process of handling file uploads pretty easy but depending on the approach - classic or using the Web Control framework - the process is handled a little differently.

Read More...

Automating Configuration of Web Connection with Code


Jul 26, 2008

Every Web Connection application you build will need to be deployed at some point. Among the required tasks are copying files and then configuring the application to create virtuals, scriptmaps, set permissions and register your servers with COM. There are a lot of different approaches that you can take to configure your application, but Web Connection includes the tools to automate this process completely. Here's some boilerplate code you can use.

Read More...

Handling BindingErrors in Tab Pages


Jul 15, 2008

The wwWebTabControl requires some special handling when dealing with binding errors as it's possible that binding errors are in controls that live in hidden tab pages. When clicking on error links it may be necessary to activate the tab page. Web Connection 5.37 includes a new global OnBindingErrorLink client function that can be used to activate a tab page. Here's how.

Read More...