We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Installing a ISAPI Extension in IIS 7.0 newbie! [Answered]RSS

8 replies

Last post Jun 20, 2007 03:37 AM by Zhao Ji Ma - MSFT

  • Installing a ISAPI Extension in IIS 7.0 newbie!

    Jun 18, 2007 02:37 PM|Daisetsu|LINK

    So I just made my first ISAPI extension in Delphi, and I have IIS 7.0 installed on Vista Home Premium.  I tried looking all over online and apparently I need to activate/install the ISAPI extension, then create some virtual folders, make some "applications", something with modules.

     All I'm asking is how do I take my .dll and have it run?
     

    isapi

  • Re: Installing a ISAPI Extension in IIS 7.0 newbie!

    Jun 18, 2007 03:10 PM|iiscool|LINK

    If you simply want to 'take your .dll and have it run' you just have to:

    1. Allow execute permissions on your site\app\vdir: This is required because, for security reasons, the default permissions available to a site are 'read' and 'script' but an ISAPI extension needs execute permissions to execute. You can do this by going to inetmgr.exe->LocalMachineName->Sites->Default Web Site->Handler Mappings->Edit Handler Permissions and check the 'Execute' checkbox.

     2. Tell IIS to allow your ISAPI: By default, for security reasons, all unrecognized ISAPIs and CGIs are restricted from executing. You need to tell IIS to allow your ISAPI extension to run. You can do this by going to inetmgr.exe->LocalMachineName->Isapi And CGI Restrictions->Add. Specify the dll path and remember to check the "Allow extension path to execute" checkbox.

    In the above example, for simplicity sake, I have assumed you want to configure your isapi at 'default web site' level. If you want to do it for some other site\app just replace 'default web site' with your site\app name in the above description.

  • Re: Installing a ISAPI Extension in IIS 7.0 newbie!

    Jun 18, 2007 03:51 PM|Daisetsu|LINK

    Ok, second time trying to write this post.  First time the forums had an error and my post wasn't here when I hit back.

     Anyway, thanks for the fast response!  I am trying to follow those directions but on #1 I am stuck since when I go to Default Web Site there is no Handler Mappings.  Here's a screencap incase I just don't know where it is or something.  http://uomu.com/public/problemiis.jpg

     I've never used IIS before, so I dont know my way arround, I've always been an Apache guy.

  • Re: Installing a ISAPI Extension in IIS 7.0 newbie!

    Jun 18, 2007 04:19 PM|iiscool|LINK

    "Handler Mapping" is in the middle pane. Double click that and follow the remaining steps.

  • Re: Installing a ISAPI Extension in IIS 7.0 newbie!

    Jun 18, 2007 05:03 PM|Daisetsu|LINK

    Whoops, that one was hard to miss.  Although I'm a bit stuck on the second part now.  I've gone through the list in Manager -> CompName a few times and I'm not seeing anything about ISAPI and CGI permissions.

    http://uomu.com/public/cantfindISAIconfig.jpg

  • Re: Installing a ISAPI Extension in IIS 7.0 newbie!

    Jun 18, 2007 05:43 PM|iiscool|LINK

    Hhmn. You don't seem to have installed all the required components. Try installing the 'Application Development Updates' like ISAPI, CGI, etc. Refer this link to know what exactly I am talking about: http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=955&p=3 (Look for the 'Application Development' section)

    Refer this link to know how to install the required features: http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=955&p=5

     Once you install the necessary features, follow instructions from my original response.

  • Re: Installing a ISAPI Extension in IIS 7.0 newbie!

    Jun 18, 2007 06:11 PM|Daisetsu|LINK

    Ok, got the CGI, and ISAPI filter & extension modules added on.  I can find CGI config, ISAPI filter config, but where do I configure ISAPI extensions?  Is it the same place as ISAPI filters?

    http://uomu.com/public/almostdone.jpg

  • Re: Installing a ISAPI Extension in IIS 7.0 newbie!

    Jun 18, 2007 06:56 PM|iiscool|LINK

    There is no special configuration-UI for isapi extensions (and filters and extensions are very different :-) ). Just follow the steps I mentioned in my previous mail. I am copy\pasting them below for you:

    1. Allow execute permissions on your site\app\vdir: This is required because, for security reasons, the default permissions available to a site are 'read' and 'script' but an ISAPI extension needs execute permissions to execute. You can do this by going to inetmgr.exe->LocalMachineName->Sites->Default Web Site->Handler Mappings->Edit Handler Permissions and check the 'Execute' checkbox.

    2. Tell IIS to allow your ISAPI: By default, for security reasons, all unrecognized ISAPIs and CGIs are restricted from executing. You need to tell IIS to allow your ISAPI extension to run. You can do this by going to inetmgr.exe->LocalMachineName->Isapi And CGI Restrictions->Add. Specify the dll path and remember to check the "Allow extension path to execute" checkbox.

  • Re: Installing a ISAPI Extension in IIS 7.0 newbie!

    Jun 20, 2007 03:37 AM|Zhao Ji Ma - MSFT|LINK

    Hi,

    There are two configuration locations related to ISAPI Extension in IIS 7: "Handler Mappings" and "Isapi And CGI Restrictions". If you map your file extension in "Handler Mappings" to your ISAPI Extension dll, IIS Manager will prompt requesting to enable ISAPI Extension. Please select yes, so you don't need to do anything other configuration.

     

    Zhao Ji Ma
    Sincerely,
    Microsoft Online Community Support