When running in 64 bit versions of Windows with IIS there are special configuration issues to consider. Web Connection can run both 32 bit and 64 bit modes using two different approaches:
- Web Connection ISAPI DLL (32 bit)
The Web Connection ISAPI DLL is a 32 bit application and requires that the Web Server runs in 32 bit mode. It's possible to switch a 64 bit Web server into 32 bit mode using a Metabase configuration switch, but unfortunately this switch affects all Web Applications on the server at least under Windows 2003. Windows 2008 allows configuration of Win32 mode on an AppPool basis.
- The Web Connection Managed Handler (32 bit and 64 bit using .NET)
The Web Connection .NET Managed Handler allows running the Web Connection connector as a 64 bit application inside of the Web Server. This means that both file based and COM operation can run in 64 bit mode and communicate with the 32 bit FoxPro servers.
Here's a quick review of the issues involved:
Web Connection ISAPI DLLIf you try to run the Web Connection ISAPI DLL on a 64 bit server without 32 bit compatibility mode enabled any request to the Web Connection DLL will fail with a 500 Server error and this error:
%1 is not a valid Win32 application.
(note that if you use IE default error reporting it will not actually show this error because the error message is too short - you'll only see the 500 Internal Error Page)
When running IIS 7 you will get a server based exception and if debugging is enable you will get an Internal Server Error with an ExecuteHandlerRequestHandler error message which looks like a security violation.
This indicates that the ISAPI extension is called from a 64 bit server instance. To fix this issue you need to do the following:
Enable 32 Bit operation on Windows 2008IIS 7 supports the ability to isolate the 32 bit enabling flag on an Application Pool Level which means you can change the 32 bit flag specifically for your App Pool that Web Connection runs in - typically the West Wind Web Connection AppPool. Unfortunately, this flag setting on the AppPool is new in IIS 7 and is not supported through the IISAdmin tools, so for now this has to be set manually.
The flag is set in the Application Pool Settings Manager with the Advanced Options:
Enable 32 Bit operation on Windows 2003 Server/XPYou can set the 64 bit option using the IIS Admin tools using the following code in VFP:
DO CONSOLE WITH "ENABLE64BIT"
to turn it off:
DO CONSOLE WITH "ENABLE64BIT","OFF"
You can also run CONSOLE.EXE from the Windows Command prompt:
CONSOLE.EXE ENABLE64BIT CONSOLE.EXE ENABLE64BIT OFF
Reconfigure ASP.NET for the proper 32 or 64 bit version
In addition you may have to fix ASP.NET if it is installed on the server. ASP.NET 2.0 installs an ISAPI filter and that filter needs to be tied to either the 32 bit .NET runtime or the 64 bit version. If the wrong filter is installed you will get a Service is Unavailable error as the Application Pool crashes basically on any request and shuts down.
To set up ASP.NET for 32 bit:
To set up ASP.NET for 64 bit:
Note that this ASP.NET configuration is REQUIRED even if you don't use ASP.NET, but if it is enabled. To check for this go to:
IIS Service Manager | Web Sites | ISAPI Filters
In the list you should see the ASP.NET ISAPI filter if it's active. If it is there you will need to run the above command line appropriate for this version. Or if you don't use ASP.NET at all you can just remove the filter.
The Web Connection .NET Managed Handler can run in 64 bit ModeWeb Connection 5.20 and later also ships with a .NET HttpHandler Handler that is capable of running in 64 bit mode natively without requiring any changes to the Web Server. The Handler supports operation both in file and COM modes.
The Handler works with ASP.NET 2.0 on IIS 6 or as a native HttpHandler in IIS 7.0 and it works without any configuration changes both in 32 and 64 bit mode.
For more information please check out Using the Web Connection Managed Handler.
DCOM Configuration on 64 bit WindowsDCOM configuration on 64 Bit Windows requires that you run DCOMCNFG in a 32 bit mode so that 32 bit components are properly configured. To do this you can run the following from the Windows Run box (Start Menu -> Run):
mmc comexp.msc /32
Failing to do so *may* cause problems with security configuration. Specifically if you don't see the option to run the DCOM component on the local machine you need to run the above. It's not always the case but this has caused several of our customers problems. Running the above always fixes these problems on 64 bit machines.
See alsoUsing the Web Connection Managed Handler
Comment or report problem with topic