Installing an ISAPI/CGI extension on Windows 2003
This is the last article that has to be rewritten since I lost my database, it is also the one that people have asked for most so it feels good to finally get it up and running again.
This article describes how to setup IIS6 on Windows 2003 to allow it to execute ISAPI and CGI extensions. For this example I’m using my own ISAPI application called Imager Resizer (which also was the reason that I wrote this article from the beginning).
![]()
First of all you need to locate your IIS Manager, if you don’t have it as a desktop icon as I have you will find it under Start->Settings->Control Panel->Administrative Tools->Internet Information Services and open it up.

When the IIS Manager opens up you first click on “Web service Extensions” node in the tree view on your left. This brings up a list with the currently known ISAPI/CGI extensions on your server. At the top of the list you’ll see “All Unknown CGI Extensions” and “All Unknown ISAPI Extensions”, by default both these are prohibited and I would recommend that they stay that way. If you are running a ton of different ISAPI or CGI extensions or is just a very lazy person that doesn’t care to much about security you can allow unknown extensions to execute but remember that if someone manage to put an ISAPI or CGI extension on your server without you knowing (a flawed upload script or whatever) they can do almost anything with it. If you decide to allow all unknown extensions you can skip to the last part of the article now.

To add a new extension to the list you can either go via the Action menu and selecting “Add a new Web service extension” or you can right click in the list (not on an item though!) and select the same thing.

This dialog is quite self explanatory but I’ll describe it anyway. Here you assign a name to identify the extension, in my case I chose “Imager Resizer” for the name. Then I click the “Add” button to browse to the required files (only Imager.dll in my case) and then finally I check the checkbox with the label “Set extension status to Allowed” so I don’t have to enable it manually afterwards. After that, I simply click OK and the dialog vanishes. Now Imager Resizer will be visible in the extension list (since I took the screenshots from my production server Imager Resizer was already in the list though) and it’s status is set to Allowed.

Now we’ve introduced Imager.dll to IIS and told it to allow it to execute, however there is one more condition that must be filled and it has been there since IIS5 and maybe even longer then that. Anyway, what you need to do is to set the “Execute permissions” for the folder that holds the extension to “Scripts and Executables”. This is done by locating the folder in the IIS Manager (under Web Sites->MySite for example), right clicking on it and then selecting properties. In the properties dialog you chose the “Virtual Directory”/”Home directory” tab and look at the bottom of it. The second combobox counting from the bottom is the “Execute permissions” (hopefully you were able to read that yourself though) and it is probably set to “Scripts only” to start with. Set it to “Scripts and Executables” and click OK.
Thats it, now you should be able to browse to your extension and see it in action. If using Imager Resizer you can use the /test action to verify that it works correctly by going to http://www.mysite.com/Imager.dll/test. It should then return a page looking something like this: http://www.kallesbildarkiv.se/cgi-bin/Imager.dll/test. Thats it for this article, hope I didn’t miss anything essential and that it will help a few people setting up Imager Resizer or any other ISAPI or CGI extensions.