Here's a quick review of the issues involved:
%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)
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
You 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:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_iisreg -i
To set up ASP.NET for 64 bit:
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727>aspnet_iisreg -i
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 module 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 Module.