ISAPI Common Issues

Last Updated: 9/22/2008



Sections above here:
Home  ยป  Deployment

Sections below here:

Topics in this section:
Deployment Overview
External Files
Permissions
ISAPI Deployment
ISAPI Notes
ISAPI Utilities
ISAPI Hosting
ISAPI Common Issues
Standalone Deployment
Apache
Service Deployment
Launching Applications
Converting between application types
Application Ports

Search Documentation:

ISAPI and thread pooling
The ISAPI and thread pooling section refers only to IntraWeb for Delphi applications. Starting with IntraWeb 5.1 the following export clause needs to be added into the project file (.dpr):
    exports
        GetExtensionVersion,
        HttpExtensionProc,
        TerminateExtension;

This is necessary because of latest ISAPI and thread pooling modifications in IntraWeb.

ISAPI extensions stay in memory

For people not used to working with ISAPI, a common problem is "My ISAPI is loaded, and it won't unload, is this normal ?"
Yes, it is. The server alone can decide whenever to unload the extensions from memory. The unloading cannot be done from within the extension itself. This design is intended to give a performance boost - opposed to CGI protocol, where the application is loaded every time it's executed. The ISAPI modules stay in memory, this reducing the time required to load. This system provides other advantages as well, like improved security and shared memory.

ISAPI extensions must be unloaded to be replaced

You may discover that, while developing, the executable (library) cannot be produced. This is a common situation when working with ISAPI and it's caused by the web server, which has loaded the ISAPI extension and still hasn't unload it. To continue your development you'll have to either unload the ISAPI manually, or rename the output file. For instructions on how to remove the ISAPIs manually, please see the documentation of the web server you are using.

ISAPI Manager

A solution to avoid the situation described previously is to use an intermediary DLL, which loads and unloads your application ISAPI as needed. We recommend to use ISAPI Manager, which can be downloaded from http://www.dataweb.de. Other tools that perform the same task are available.

How to unload from IIS

Apart from stopping and restarting the web server, IIS provides other means to unload the ISAPIs. This will be done automatically if you do the following:

For IIS 3 or lower:

    To turn ISAPI caching off you will have to change the following registry entry to 0:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\CacheExtensions
    After changing this entry, restart the web server and ISAPIs won't be cached anymore.
    To put the cache option back on, simply set the same value to 1 and restart the web server.

For IIS 4 or higher:

    Right click on the script directory of your website, then select "Properties" and on the "Virtual Directory" tab choose the                 "Configuration..." button. Deselect the "Cache ISAPI applications" checkbox and click twice on "OK" to save the settings.

What does the Use ISAPIThreadPool checkbox mean?

When creating a new ISAPI application, the wizard displays the option "Use ISAPIThreadPool". If checked, the unit ISAPIThreadPool unit will be included in the project. According to Borland, for ISAPI apps the ISAPIThreadPool unit boosts scalability by using pooling threads and by handling a lot more users and concurrent requests.

This option should be used only when the applications runs under IIS.




(C) 2002-2009 - Atozed Software Ltd.