|Problems? Is your data what you think it is?|
See this helpful MS KB article.
Run your program from a command-line, and make sure the first few lines are identical to the ones generated by the MS sample.
Is is also possible that your program does not compile, or run properly in the deployed CGI environment.
Look for errors in the IIS logs.
There is also a potential IIS6 bug.
FYI - All this info was obtained by googling the error message. (Encouraging self-help).
"By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest." -Confucius