This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Cannot add an application mapping (ISAPI) in IIS7
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 19, 2010
04:18 PM
Cannot add an application mapping (ISAPI) in IIS7
Hello,
I developed a basic MSI project that installs a Web Site on port 80.
It adds a custom application pool, then create two virtual directories
that use this application pool. For each of these virtual directories,
i must add an "application mapping" to the php isapi dll that i installed with the project too.
It works great with IIS 6.0, but with Win7 & IIS 7.0, the installation rollbacks!
InstallShield 16:27:50: AddElement failed with the following HRESULT: '-2147024863':
InstallShield 16:27:50: Error in setting the AppMaps of smartprofile_admin
InstallShield 16:27:50: Error with IISRT: -2147024863. Error translation: The process cannot access the file because another process has locked a portion of the file.
CustomAction ISIISInstall returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Fin de l'action 16:27:50 : InstallFinalize. Valeur renvoyée : 3.
Action 16:27:50 : Rollback.
Is this happening because the installer im using also installed the isapi filter and has not finished yet???
Regards
Louis-Pierre Beaumont
I developed a basic MSI project that installs a Web Site on port 80.
It adds a custom application pool, then create two virtual directories
that use this application pool. For each of these virtual directories,
i must add an "application mapping" to the php isapi dll that i installed with the project too.
It works great with IIS 6.0, but with Win7 & IIS 7.0, the installation rollbacks!
InstallShield 16:27:50: AddElement failed with the following HRESULT: '-2147024863':
InstallShield 16:27:50: Error in setting the AppMaps of smartprofile_admin
InstallShield 16:27:50: Error with IISRT: -2147024863. Error translation: The process cannot access the file because another process has locked a portion of the file.
CustomAction ISIISInstall returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Fin de l'action 16:27:50 : InstallFinalize. Valeur renvoyée : 3.
Action 16:27:50 : Rollback.
Is this happening because the installer im using also installed the isapi filter and has not finished yet???
Regards
Louis-Pierre Beaumont
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 21, 2010
08:01 AM
Finally, i found why!
By default, IIS 7.0 has security restrictions for application mappings.
A new web.config cannot override the handlers is these restrictions are enabled.
To disable them, i added a custom action before installing the web site.
This custom action calls appcmd.exe with these parameters:
appcmd.exe unlock config /section:system.webServer/handlers
Also, IIS 7 has a list of ISAPI dlls that are allowed/denied to load.
To allow an ISAPI dll to be loaded, another custom action must be added:
inetsrv\appcmd.exe set config /section:isapiCgiRestriction /+"[\[]path='MyIsapiDllPath.dll',description='MY ISAPI',allowed='True'[\]]"
And finally, there is another problem: when InstallShield adds the new application mapping to the list of handlers, it is added at the last position of the list. By default there is a filter that handles *.*, so the new filter wont work!
To remedy that, a final custom action must be added:
appcmd.exe set config /section:handlers /+"[\[]name='MY ISAPI',path='*.myextension',verb='GET,HEAD,POST',modules='IsapiModule',scriptProcessor=''MyIsapiDllPath.dll',resourceType='File'[\]]"
All these custom actions require administrator rights. To make sure they work, you must Advertise if prerequisites are elevated.
I hope this post will help others that have the same problem. In the future, it would be great to add an equivalent fix in InstallShield 2010 sp2.
Have a nice day!
Louis-Pierre Beaumont
By default, IIS 7.0 has security restrictions for application mappings.
A new web.config cannot override the handlers is these restrictions are enabled.
To disable them, i added a custom action before installing the web site.
This custom action calls appcmd.exe with these parameters:
appcmd.exe unlock config /section:system.webServer/handlers
Also, IIS 7 has a list of ISAPI dlls that are allowed/denied to load.
To allow an ISAPI dll to be loaded, another custom action must be added:
inetsrv\appcmd.exe set config /section:isapiCgiRestriction /+"[\[]path='MyIsapiDllPath.dll',description='MY ISAPI',allowed='True'[\]]"
And finally, there is another problem: when InstallShield adds the new application mapping to the list of handlers, it is added at the last position of the list. By default there is a filter that handles *.*, so the new filter wont work!
To remedy that, a final custom action must be added:
appcmd.exe set config /section:handlers /+"[\[]name='MY ISAPI',path='*.myextension',verb='GET,HEAD,POST',modules='IsapiModule',scriptProcessor=''MyIsapiDllPath.dll',resourceType='File'[\]]"
All these custom actions require administrator rights. To make sure they work, you must Advertise if prerequisites are elevated.
I hope this post will help others that have the same problem. In the future, it would be great to add an equivalent fix in InstallShield 2010 sp2.
Have a nice day!
Louis-Pierre Beaumont
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)