IIS Error Message - “The specified CGI application misbehaved by not returning a complete set of HTTP headers”

A user of one of my web applications reported that he was getting the error “The specified CGI application misbehaved by not returning a complete set of HTTP headers” after logging in.

After spending several hours Googling for answers I logged in and went to work with the intent of trying each of the few dozen or so possible solutions. Luck was on my side and the first thing I tried worked.

The cause was part of the script that was running the ImageMagick convert command to get the version information. By default my application uses a Linux path (/usr/bin/convert) because that’s what most web servers are. But that line was triggering the error on IIS. So I changed the code to not run those lines and the program works without a problem.

Question, Comments...

Do you have more questions. Please either leave a comment below or join us in our new forum.

2 Responses to “IIS Error Message - “The specified CGI application misbehaved by not returning a complete set of HTTP headers””

  1. Hi, i’m Andrite from Malaysia, i am facing the same problem as yours also i’m hosting in IIS, may i know how u change the code?i mean the modified coding. thank you very much! ^_^

  2. It depends on what program you’re using. In my case I was trying to run a Linux command through an exec() command.

Leave a Reply