Archive for January, 2012

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.

Difference between Classic mode and Integrated Mode And how to Switch a Website from Classic Mode to Integrated Mode

In classic mode IIS works only with ISAPI extensions and ISAPI filters.IIS 6.0 Works in classic mode where is an ISAPI extension and filter . In this Mode the server uses two pipelines to handle requests one for native code and other for managed code . Whereas Integrated Pipeline mode consists of unified request processing pipeline that is exposed to both native and managed components known as modules.With integrated mode ASP.NET runs much more efficiently in IIS and will yield greater performance for your site.

You can switch your website or application  from Classic mode to Integrated mode and vice-versa from IIS 7.0 .

Open IIS manager , click on application pools . Right click the application pool of your website click advanced settings and in the Managed pipeline mode select Integrated from the drop-down box.

Create a Website in IIS 7.0 and Make it Live on the Internet

1) Before adding your first website you will need to register the website or you can register the website after you have added it in IIS in order for the website to work.

2)  After that on your Windows Server Go to Start => Run and type inetmgr . This will open your IIS manager . In the Left pane Right Click on Sites and Click Add Website . Input the website name , the Physical path for the root of the website, select the IP address to which you want to point your website from the drop down  and the hostname of the website . Click Ok and the website will be added in IIS.


3) On the Server go to Start => Administrative tools=>DNS  =>Right Click Forward Lookup Zones =>Click New Zone , click Next , Select Primary Zone , Click next , type the website Name which you had created from IIS , click next , click next , Select Do not allow dynamic updates , click next , click Finish.

4) Once the Zone has been added you can Set the Name servers for the website and add the A record to point the website to your servers IP .

5) You now need to ask the registrar to point the A record of the website to the servers IP or Use the Name Server Set on the server .

Thats it . Now you can browse your website in the browser and start uploading files to the home directory of your website.

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