Share via


How Does ISAPI Compare with CGI?

OverviewHow Do IFAQDetailsSample

ISAPI server extensions provide an alternative to the use of Common Gateway Interface (CGI) applications for Internet servers. Unlike CGI applications, ISAs run in the same address space as the HTTP server and have access to all the resources available to the HTTP server. ISAs have lower overhead than CGI applications because they do not require the creation of additional processes and do not perform time-consuming communications across process boundaries. Both extension and filter DLLs may be unloaded if the memory is needed by another process.

An Internet client calls an ISA through the HTTP server the same way it would call a CGI application. For example, a client might call a CGI application as:

http://sample/example.exe?Param1&Param2

It would call an ISA that performs the same function as:

http://sample/example.dll?Param1&Param2

ISAPI allows multiple commands in one DLL, implemented as member functions of the CHttpServer object in the DLL. CGI requires a separate name and URL mapping to a separate executable file for each task. Every new CGI request launches a new process, and each different request is contained in its own executable file, loaded and unloaded on each request, so overhead is higher than for ISAs.

ISAPI filters have no CGI equivalent. Filters provide the capability of pre-processing and post-processing of all data sent between the client and the server.