If you're using Perl, or the ilk, you probably forgot to set up an FCGI wrapper. This can occur if you try to replace CGI, with FastCGI and don't use something like IIS::FCGI, or an MVC fastcgi wrapper. Reference this book's perl-specific documentation at Scripting languages/Perl.

Another common cause is a misconfiguration script, or a script that crashes on startup. Make sure your fcgi script runs outside of the webserver environment (run it explicitly in the cmd shell).