在windows server 2008 上部署IIS程序的时候,提示 Do you want to save this file, or find a program online to open it? 的解决办法。
1) Ensure "Allow unspecified ISAPI modules is selected"
Right-click on 'My Computer' and choose 'Manage'
Expand 'Server Manager - Roles - Web Server (IIS)'
Click 'Internet Information Services'
Inside the 'Connections' section, highlight your server
Double-click on ‘ISAPI and CGI restrictions’ (in the right-hand pane)
Under Actions on the right hand screen select "Edit Feature Settings" and make sure "Allow unspecified ISAPI modules" is selected.
2) Configure "Module Mapping"
In the left-hand "Connection" pane, highlight/select the virtual directory cgi-bin
Double-click on ‘Handler Mappings’ (in the right-hand pane)
Click on ‘Add Module Mapping’
Enter the values similar to the following (modify the path as appropriate for your version of Controller and where you have installed it):
Request path: cognosisapi.dll
Module: IsapiModule
Executable (optional): C:\Program Files (x86)\ibm\cognos\c10\cgi-bin\cognosisapi.dll
(This path location is assuming that you are using Controller 10.x installed into the default location on a 64-bit version of Windows)
Name: ISAPI-cognos
Click OK.
3) Double-check setting for 'Enable 32-Bit Applications'
If running a 64-bit version of Windows 2008, then (inside IIS administration, under "Application Pools") select your application pool for the cognos virtual directories
For example, if using the defeault "DefaultAppPool" then (on the right-hand side) click "Set Application Pool Defaults" and ensure that "Enable 32-Bit Applications" is set to "True"
4) Modify 'allowPathInfo' setting
Using Windows Explorer, open the cgi-bin folder (default = C:\Program Files\ibm\cognos\c10\cgi-bin)
Launch NOTEPAD.EXE and edit the file ‘web.config’
For example, it may currently look like:
<add name="ISAPI-cognos" path="cognosisapi.dll" verb="*" modules="IsapiModule" scriptProcessor="C:\Program Files (x86)\cognos\c8\cgi-bin\cognosisapi.dll" resourceType="Unspecified" preCondition="bitness32" />
Add the text allowPathInfo="true" near the end of the line:
For example, it would change to:
<add name="ISAPI-cognos" path="cognosisapi.dll" verb="*" modules="IsapiModule" scriptProcessor="C:\Program Files (x86)\cognos\c8\cgi-bin\cognosisapi.dll" resourceType="Unspecified" preCondition="bitness32" allowPathInfo="true" />
5) Restart IIS
Click "START - RUN"
Type: CMD <Enter>
Type: IISRESET <Enter>