I recently wrote a web.py-based stand alone web service. Due to unforeseen circumstances, the service has to run through IIS. I've heard that it's possible to run web.py as a CGI in IIS, but I'm having trouble setting it up. I can run Python CGI scripts, but I get internal server errors when I try to run the web.py-based script. The error states:
CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers.
For reference, the script is:
import web urls = ( '/(.*)','hello' ) class hello: def GET(self,name): i = web.input(times=1) if not name: name = 'world' for c in xrange(init(i.times)): print 'Hello, '+name+'!' if __name__=="__main__": web.run(urls)
- Where are the log files for IIS that would have internal server error information?
- Do I have to employ a Rewrite ISAPI filter to use web.py on IIS?
- Do I need to employ a WSGI-ISAPI bridge to use web.py on IIS?
- Has anyone done this before?
This thread mentions using a hacked version of flup to avoid socket creation, which I've done, but to no avail.