locked
Installing a ISAPI Extension in IIS 7.0 newbie! RRS feed

  • Question

  • User-887129460 posted

    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?
     

    Monday, June 18, 2007 2:37 PM

Answers

  • User-75227868 posted

    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.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, June 18, 2007 3:10 PM
  • User113421904 posted

    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.

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, June 20, 2007 3:37 AM

All replies

  • User-75227868 posted

    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.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, June 18, 2007 3:10 PM
  • User-887129460 posted

    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.

    Monday, June 18, 2007 3:51 PM
  • User-75227868 posted

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

    Monday, June 18, 2007 4:19 PM
  • User-887129460 posted

    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

    Monday, June 18, 2007 5:03 PM
  • User-75227868 posted

    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.

    Monday, June 18, 2007 5:43 PM
  • User-887129460 posted

    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

    Monday, June 18, 2007 6:11 PM
  • User-75227868 posted

    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.

    Monday, June 18, 2007 6:56 PM
  • User113421904 posted

    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.

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, June 20, 2007 3:37 AM