IIS 7.5 + ISAPI HOW TO

In my last post I’ve mentioned connecting the JavaScript client-side code to various server data sources and have had a WCF HTTP service implemented as an example. Another –rather old fashioned but still viable, option is an ISAPI serving JSON data.

You can, of course, create the ISAPI DLL using a number of tools. What I’ve always had difficulty remembering though is the exact steps needed to host the DLL in IIS. If nothing else this post is a reminder on how to have an ISAPI hosted in a Virtual Directory under IIS 7.5, which ships with Windows 7.

 

Install IIS

Install IIS if you haven’t already done so. Besides the bare minimum make sure you have the ISAPI options (ISAPI Extensions and ISAPI Filters) checked as shown in the figure below.

Capture1

 

Configure for ISAPI DLL

  1. Open IIS Manager.
  2. Assuming you already have a Virtual Directory created under the Default Web Site node select it and double click the Handler Mappings icon.
  3. Click Edit Feature Permissions in Actions panel.
  4. Check Execute in the Edit Feature Permission dialogue.

Capture2

Enable ISAPI modules

  1. Click on the root node and double click the ISAPI and CGI Restrictions icon.
  2. Click Edit Feature Setting in Actions panel.
  3. Check Allow unspecified ISAPI modules option.

Capture3

Set security permissions

Please note that the following steps must not be taken on a deployment server as is. I could use a helping hand on amending this part of the guide by providing the exact accounts and permissions that should be used on deployment servers (please email me or leave a comment if interested in helping).

  1. Select the Virtual Directory and double click the Authentication icon.
  2. Select the Anonymous Authentication item and click Edit in Actions panel.
  3. Check the Application pool identity option and close the dialogue.
  4. Right click on the Virtual Directory node and click Edit Permission in the popup menu.
  5. Use the Security tab to add the IIS_IUSRS or Everyone account and give sufficient permissions.

Capture4

Enable 32bit ISAPI DLL on IIS 7 x64

If you are using IIS 7 x64 and would like to run 32 bit ISAPI DLL you need to follow the following steps:

  1. Click the Application Pools node.
  2. Select the DefaultAppPool item and click Advanced Settings from the Actions panel.
  3. Set the Enable 32-Bit Applications to true.

Capture5

 

You are good to go Γελαστούλης

Share


Έχουν δημοσιευτεί Κυριακή, 19 Φεβρουαρίου 2012 6:51 πμ από το μέλος dpant
Καταχώρηση στις κατηγορίες: ,

Σχόλια:

Χωρίς Σχόλια