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

Latest Weblog Posts

Deploying and Configuring West Wind Web Connection Applications

5 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.


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.


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.


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.


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.


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.


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.


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.


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.


Marking up the World with Markdown and FoxPro

11 months ago

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.


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.


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


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


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.


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.


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.


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.


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.


Web Connection and TLS 1.2 Support

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.


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


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.


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.


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.


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.


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.


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.


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.


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


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.


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.


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.


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.


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.


Visual Studio Gets Support for FoxPro Files

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.


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.


Calling JSON REST Services with FoxPro and wwJsonServiceClient

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.


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.


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.


String Tokenizing based on StrExtract()

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.


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.


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.


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.


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.


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.


Visual FoxPro and Multi-Threading

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.


A Preview of Features for Web Connection 6.0

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.


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.


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.


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.


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.