KB2005.0502
Problem: CGI programs are installed but not responding on Windows 2003 Server using IIS
This article applies to all CGI applications.
Last updated: 4/13/2006
Problem
The CGI program is installed on Windows Server 2003, but the CGI application doesn't appear
to be responding even though IIS is running.
Details
CGI applications require that CGI scripting be properly enabled on the web server. Versions of IIS starting with 6.0 on Windows Server 2003 have new
restrictions on applications that require additional configuration steps to enable CGI programs. By default, any
new CGI program must have an Application Extension Mapping defined for its executable in the website properties,
AND it must be added to the Web Service Extension Restriction List (WSERL) before
it will be executed by IIS.
Solution
First, be sure you have followed the basic installation instructions for the application correctly (copied the CGI executable file to your scripts folder and given it proper
NTFS access permissions and the correct IIS execute permissions to run as a script).
Next, you will need to create an Application Extension Mapping for the CGI program executable in your website properties.
To do this, open IIS Manager and view the Properties for your website. Click the the Home Directory tab and click the
Configuration button in the Application Settings section to bring up the Application Configuration dialog. Click the Add button to add the complete local path
to the CGI program executable file. Use Browse to locate it if necessary. Note: You cannot use a virtual directory in your path, it must be an actual path (i.e. C:\Inetpub\scripts).
Be sure the Allow all verbs radio button is selected and apply your changes.
Finally, you must add the CGI program executable to the Web Service Extension Restriction list (WSERL).
You can do this in one of two ways:
- Use the Web Service Extension section of the IIS Manager MMC to allow all CGI programs to run, regardless
of whether they are entered in the WSERL. Note this option is easier to implement but somewhat less secure than the other method.
- Open the IIS Manager MMC applet
- Choose the Web Service Extensions section and set the "Allow All Unknown CGI Extensions" option to "Allow."
- Use the IIS IisExt.vb command-line script to add the executable to the WSERL.
- Open a Command Promt window and change to the Sysvol\System32 folder (the default is Windows\System32)
- Type the following:
iisext /EnFile ScriptPath\ExecutableName
where ScriptPath is the complete path to your Scripts folder, i.e. c:\Inetpub\scripts and ExecutableName is the filename of the
executable, i.e. dompass.exe Thus, in our example, the complete line for enabling dompass.exe would be:
iisext /EnFile c:\Inetpub\scripts\dompass.exe
You should receive the following response:
Connecting to server ...Done.
Enabling extension file complete.
See Microsoft Knowledgebase article 328360 and
Configuring CGI Applications
pages for more information on enabling CGI.
|