200 OK 201 Created 202 Accepted 204 No Content 301 Moved Permanently 302 Moved Temporarily 304 Not Modified 400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable
Other errors occur frequently. As you try the various solutions listed here, consider restarting your server after making a change. To be extra sure, click on the top node in the Connections panel, the one that lists your server, not one that lists a site. Choose Restart.
The directory where you put your scripts needs to support the "authenticated user" identity. This means you need to write click on the directory, select properties, turn the Security page, and add "Authenticated Users" as one of the "Group or user names." This user should have modify and write permissions." This should be given to the directory automatically, but if it is not, then you should add it. I did this, and my Errno 13, message about not having write permissions went away.
It is perhaps worth adding that I got this error on folders that I downloaded from a third party (one of my students), and pasted into an existing web site. This meant I was not the one who created the directory. It was created on a student's machine; he zipped up the folders, sent his archive to me, and I unzipped it into an existing site.
A key point to grasp here is that if you give users anonymous access to your web site, then they run as one of the "Authenticated Users."
Traceback (most recent call last): // CODE OMITTED HERE IOError: [Errno 13] Permission denied: 'SomeFile.data'
Note that Errno 2 can also be related to this problem. Sometimes the reason a file does not exist is because the script that should have created it did not have the right permissions.
One dark and rainy night, I got a 404.2 error on my Windows Server. The error message I got in the browser was actually very informative, but I had trouble decipering it: "The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server."
The fix was quite simple:
In my case, the problem was simply that I was pointing to the wrong copy of Python. I had installed it twice on my system. In my Handler Mapping I pointed at one copy of Python.exe, and in this setting I was pointing at the other copy. The moment I brought them into sync, things started working for me.
This error frequently points at a Web.Config that does not have the appropriate permissions. I fix it by right clicking on the web.config file in the Windows Explorer. Select properties. If the file is blocked, choose unblock. Turn to the security page. Select Edit and Add iis_iusrs. Make sure to check the name. Sometimes you might also have a section in the web.config file that is not valid without adding more permissions. Try removing sections from the file.
These can result from creating malformed HTML or XML. Try running simple scripts that you know are right and see if they work. Try running your Python script from the command line, and then taking the output and running it through the XML validator:
If you get a 502.2 error with 0x0000000 error id, then you may have left off the %s %s bit when setting up the Script Handler for Python. See this page for details: