Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been trying for the past few hours to get python working on a test machine. The machine is running Server 2008 SP2 with IIS7 (32 bit). I have nearly all the role's services installed except for ASP.Net , .Net extensibility and ASP . I have installed python2.6 and download the correct version of pyISAPIie . I have followed to the word the following instructions i found :

Installation on IIS 7

  1. First make sure IIS is actually installed (Server Manager >> Roles >> Add Web Server IIS). Ensure the ISAPI Extensions and ISAPI filters are both checked.

  2. Download the latest PyISAPIe extension. Make sure you get the correct version for your version of Python. In this example I am using Python 2.5.4 and PyISAPIe 1.1.0-rc4-Py2.5

  3. Where to put the files took a while to the end it becomes apparent they can be placed anywhere! I got confused by my understanding of packages and by thinking I could test the Python scripts outside of a browser / IIS.

In the end I created a new folder in C:\Python25 named PyISAPIe. I then copied into this the pyISAPIe.dll and HTTP folder.

  1. Next you’ll need to set up the handler in IIS. I wanted all files that ended with the .py extension to be handled by the PyISAPIe DLL, so I did the following:

    under sites add a new application (I used the name /apps) select the site, and then select “Handler Mappings” right-click and select “Add Script Map” set the “Request path” to *.py set the “Executable” to “C:\Python25\PyISAPIe\PyISAPIe.dll give the handler a relevant name such as “PyISAPIe” in the Request Restrictions section, I set my handler to run only when a request contains a .py file that exists on the server. I set it handle all verbs (GET and POST), and gave it Script access. select the “View Ordered List” in the Actions panel to see in what order handlers will be applied to a request. Make sure your .py handler has a higher priority than the default StaticFile handler, or it won’t get a chance to handle anything. The StaticFile handler may also appear to be handling requests if your custom handler fails as by default PyISAPIe moves to the next handler on an error.

Then it says to create the following test script : ( ) from Http import * def Request(): Header("Content-type: text/html") Write("Hello, World!")

When i browse to "http://localhost/" i get the following errors : HTTP Error 500.0 - Internal Server Error

There is a problem with the resource you are looking for, so it cannot be displayed.

Detailed Error Information

Module : IsapiModule Notification :ExecuteRequestHandler Handler : Python Error Code : 0x8007007e Requested URL :http://localhost:80/ Physical Path : C:\inetpub\test\ Logon Method : Anonymous Logon User :Anonymous

Anyone have any ideas on how to fix this?

share|improve this question
Having similar issues myself. This might help: -- Can you view a plain test.html with that config, or does that give an error? – monkey Feb 3 '13 at 5:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.