Sunday, February 8, 2009

Add extension to IIS to serve .sadique extension file

A very good & detail article for this will be found at here.

It describes how to http handlers & modules work.

For busy readers here is the summary of how we have to configure our application to handle .sadique extension file-

1) Create a new C# Class Library project in Visual Studio.NET and name it "MyHandler". Add NewHandler.cs class to this project which implements IHttpHandler by implementing method- public void ProcessRequest(System.Web.HttpContext context).

2) Register this handler by adding httphandlers in the web.config file:

<httpHandlers>
<add verb="*" path="*.sadique" type="MyHandler.NewHandler,MyHandler">
</add>
</httphandlers>

3) Launch the Internet Services Manager tool, right click on Web Site, select Properties, go to Home Directory tab and press Configuration button. This will popup Application Configuration dialog. Click Add button and fill the Executable field with the path to the aspnet_isapi.dll file and fill .sadique in the Extension field.