IIS 7 and Above
Configuration & Scripting
Handler mapping config for ISAPI dll... please advice
Last post Jan 11, 2010 12:45 PM by StijnDeWitt
Jan 06, 2010 03:38 PM|StijnDeWitt|LINK
We have a web application written in Delphi that runs in IIS as an ISAPI dll. In IIS7, running ISAPI dll's has become a bit more complicated. You have to set CGI/ISAPI restrictions to allow your DLL to execute and you have to create a handler mapping that
maps incoming requests to certain paths to your ISAPI module. The pro is -or could be- that configuration is now stored as plain text and spread out over different files, theoretically allowing us to deliver a pre-configured site to the customer.
After strugling with it we now have a working configuration. But two big questions (and problems) remain:
1) How to configure allowPathInfo="true" from the GUI
We'd rather not advise our clients to mess around in the config files, but so far I have not been able to locate the checkbox in the GUI where you can set allowPathInfo to true... does it even exist? If not, is that an oversight or is there some smart reasoning
behind it's ommision?
2) How to use relative paths to the ISAPI dll in web.config
The web.config from our currently correctly working site looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<handlers accessPolicy="Read, Execute, Script">
<remove name="ISAPI-dll" />
<add name="ISAPI-dll Engine" path="*/Engine.dll" verb="*" modules="IsapiModule" scriptProcessor="C:\MyCompany\MyApp\WebSite\Engine.dll" resourceType="Unspecified" requireAccess="Execute" allowPathInfo="true" />
<add name="ISAPI-dll FileUpload" path="*/FileUpload.dll" verb="*" modules="IsapiModule" scriptProcessor="C:\MyCompany\MyApp\Website\FileUpload.dll" resourceType="Unspecified" requireAccess="Execute" allowPathInfo="true" />
Because of 1), we thought we could circumvent the problem by just delivering, together with the rest of the website, a pre-configured web.config to our customers so both handler mappings would be configured correctly out-of-the-box. But the problem we have
with this solution is that IIS seems not to like relative paths for the scriptProcessor attribute.
We would like to put there just the relative path, from the website, to the ISAPI module, like so:
<add name="ISAPI-dll Engine" path="*/Engine.dll" verb="*" modules="IsapiModule" scriptProcessor="Engine.dll" resourceType="Unspecified" requireAccess="Execute" allowPathInfo="true" />
However that does not work.
Is it even possible? Does it have anything to do with the location tag that I have read about here and there? I thought not, but I may be wrong ofcourse :)
Can you advice us? Is our approach correct or are we missing something big?
Is it possible to deliver to the customer, in the standard product, some config files so if he adds the application to IIS 7, the handler mapping config we need is made automatically?
Jan 06, 2010 07:43 PM|Jamescoo|LINK
I can help you with your first question maybe
This will contain some links to install adminpack which will install a Configuration Editor in the IIS manager GUI. That can help you get to allowPathInfo. It works for setting at apphost level or web.config.
Hope this helps some
Jan 07, 2010 09:34 AM|StijnDeWitt|LINK
Thanks James, I will have a look at that.
Jan 11, 2010 12:45 PM|StijnDeWitt|LINK