Que FoxISAPI Sample
In order to run these examples make sure you do the following:
- Make sure Internet Information Server is running.
- Copy FOXISAPI.DLL from your \VFP\SAMPLES\SERVERS\FOXISAPI directory into your \INETINFO\SCRIPTS directory.
- Register the QueVFP.EXE OLE server supplied on the Using Visual FoxPro CD by copying it to your hardisk and running QueVFP /regserver to
register the server in the registry.
- Make sure that your IUSR_XXXXX account is properly set up both in the IIS service manager as the default for the anonymous user and that this
user exists in your user manager as a guest account. This account for every Web user that accesses your Web server.
- In your \WINNT40\SYSTEM32 directory run DCOMCNFG.EXE. This utility sets the access rights for OLE servers in your system. Start by setting the
selections on the Default Properties tab: Enable DCOM and set Default Authentication to Connect and Default Impersonation to Identify (both of
these are the default). On the Default Security tab add the IUSR_XXXX account to the Access and Launch permission button lists. This step is
extremely important!!!
- If you have created an EXE server and registered it find it on the DCOMCNFG Applications tab. The name of the class should be found on this page.
Select it and click on Properties, then the Identity tab. Set the radio button to Interactive User, then click Apply. This allows the server to access
system libraries
Ok, now you're ready to run the following examples:
Simple FoxISAPI Test
This example returns a test page that demonstrates how to use FoxISAPI OLE servers to capture form variables (here passed on the
URL's Query String rather than from an HTML form), retrieve the server and browser variables passed by the FoxISAPI INI file, and
how to create the output HTML. The URL that is called looks like this:
/scripts/foxisapi.dll/wwQue.QueVFP.TestMethod?UserId=000111&UserName=Rick+Strahl
Sample Input Form
Release the QueVFP OLE Server
This link causes the QueVFP server to be released from memory, so you can rebuild the EXE file.
This link executes the FoxISAPI baseclass method ReleaseServer to be called - the message sets
release flag to 1 and causes the server to unload. All other requests by default leave the
release flag at 0 which leaves the server loaded in memory.
Note: On live servers you can't be guaranteed that your server stays unloaded since
other user can hit the same routine immediately reloading the server into memory. To reliably
shut down the OLE server for updates you might have to stop the Web server.