Microsoft Knowledge Base Email Alertz

When you use a Common Gateway Interface (CGI) application with Microsoft Internet Information Server (IIS), the following error message appears:

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 145661 - Last Review: December 3, 2007 - Revision: 4.3

You receive a "The specified CGI application misbehaved" error message

This article was previously published under Q145661

SYMPTOMS

When you use a Common Gateway Interface (CGI) application with Microsoft Internet Information Server (IIS), the following error message appears:

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

CAUSE

This error is caused by the return of an incomplete or incorrect set of headers by the CGI application. The CGI application may be written incorrectly. As well, logic errors, API failures, or anything that causes the CGI application malfunction can also cause this error.

RESOLUTION

Modify the source code for the CGI application header output. The following is an example of a correct header:
   print "HTTP/1.0 200 OK\n";
   print "Content-Type: text/html\n\n\n";
				

If the CGI is written in C++, it is possible to debug the application and ascertain the problem. Instructions can be found in following article:
238788  (http://kbalertz.com/Feedback.aspx?kbNumber=238788/ ) How to debug CGI applications running under IIS

APPLIES TO
  • Microsoft Internet Information Server 1.0
  • Microsoft Internet Information Server 3.0
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Services 5.0
  • Microsoft Internet Information Services 6.0
  • Microsoft Internet Information Server 2.0
Keywords: 
kbcgi kbprb KB145661
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate