What is ISAPI

ISAPI that is Internet Server Application Programming Interface is a regular DLL file that exposes three special functions called by the calling process that is IIS.

ISAPI dll is loaded into the memory only once no matter how many requests as compared to CGI which loads the exe every time for every request.
The three special functions are

1) GetExtensionVersion
2) HttpExtensionProc
3) TerminateExtension (optional)

Whenever an Extension example.dll is accessed over the browser IIS checks to see whether it is loaded into the memory.If it is not then it initiates the loading process . Once it is loaded in the memory a worker thread starts running to manage the extension and then the Entry point DLLMain function is called.When the DLLMain finishes the server makes a call to the GetExtensionVersion funtion to perform 2 tasks.

1) Get version Information
2) Get a Short test Description of the extention

The server then calls  the HTTPExtensionProc function passing a Copy of the ECB pointer to start the actual ISAPI extention.This is a funtion which makes writing data back to the client.

The third and last entry point in an ISAPI extension DLL is the TerminateExtension function that is called whenever an extension is going to be unloaded from the memory. All the cleanup code can be done in this function.

ISAPI filters are DLL’s that are used to Enhance the functionality of IIS . Filters can be programmed to examine and modify both incoming and outgoing streams of data . ISAPI filters and ISAPI extensions can only be developed using C/C++.

The Basic Functions of ISAPI filters are

1) Change the Request Data Sent by the Client

2) Control Which physical file Gets Mapped to the URL

3) Control the  username or password used with Anonymous or Basic authentication.

4) Handling encryption and compression

5) Running custom processing on “access denied” responses.

Comments are closed.

(adsbygoogle = window.adsbygoogle || []).push({}); //--> Feedjit Flag Counter