You are currently offline, waiting for your internet to reconnect

Troubleshooting CGI Error

This article was previously published under Q150835
We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 7.0 running on Microsoft Windows Server 2008. IIS 7.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:For more information about IIS 7.0, visit the following Microsoft Web site:
When you submit an HTML form or click a link to a script from the webbrowser, you may receive an error similar to the following:
CGI Error

The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:

Can't open perl script "c:\inetsrv\wwwroot\scripts\":
No such file or directory
This error is caused by missing or malformed CGI header information. Inthis case the headers are missing because the script file could not be run,resulting in that error message being displayed instead of the output fromthe script.
The Common Gateway Interface (CGI) Specification calls for the script fileto return at least one header. These headers fill out the remainder of theHTTP headers as required by the HTTP protocol. The HTTP protocol alsorequires a blank line between the end of the headers and the start of thedocument. The only headers currently supported by the CGI specificationare:
   Content-type:   Location:   STATUS				

Additional information about these headers can be found in the HTTPProtocol and CGI Protocol draft specifications available at

You can also see the following Microsoft Knowledge Base article:
150629 : Configuring and Testing a PERL Script with Internet Information Server (IIS)
238788 How to Debug CGI Applications Running Under IIS
cgi prodiis1

Article ID: 150835 - Last Review: 07/07/2008 18:30:53 - Revision: 3.3

Microsoft Internet Information Server 1.0, Microsoft Internet Information Server 2.0, Microsoft Internet Information Server 3.0, Microsoft Internet Information Server 4.0, Microsoft Internet Information Services 5.0, Microsoft Internet Information Services version 5.1, Microsoft Internet Information Services 6.0, Microsoft Internet Information Services 7.0

  • kbprb kbsetup KB150835