[python-win32] Running CherryPy inside IIS

Paul Johnston paj at pajhome.org.uk
Tue May 1 18:07:59 CEST 2007


Hi,

I am trying to run a CherryPy (Python web server) application inside IIS,
and having some problems.

I'm using wsgiref and this ASP/WSGI script:
http://www.aminus.org/blogs/index.php/fumanchu/2005/05/26/wsgi_gateway_for_asp_microsoft_iis

For now I'll skip over the details of exactly how I installed that, although
I'm happy to provide more info if required.
I'm using IIS 6.0 on Windows Server 2003, with Python 2.4.

Now, I can get a single request to work - "Hello World". However, the second
request produces a stacktrace:

  File "<Script Block >", line 3, in ?
    handler(Application, Request, Response).run(wsgiApp)

  File "C:\Python24\lib\site-packages\wsgiref\asp_gateway.py&
quot;, line 85, in __init__
    Response.Buffer = buffering
  File &
quot;C:\Python24\lib\site-packages\win32comext\axscript\client\pyscript.py",
line 152, in __setattr__
    return setattr(self._scriptItem_.dispatchContainer,attr, value)
  File &

quot;C:\Python24\lib\site-packages\win32com\client\dynamic.py",
line 521, in __setattr__
    self._oleobj_.Invoke(entry.dispid, 0, invoke_type, 0, value)

COM Error: Member not found.


If I restart the "World Wide Web Publishing" service, it works again (for
one request). If I modify handler.asp or global.asa, it works for one
request.

I tried commenting out the "Response.Buffer =" line, and I get another "COM
Error: Member not found", seemingly at the next point COM is used.

I've tried refreshing loads of times (in case this is some kind of pooling
issue) but I never get a second successful request.

Any suggestions will be much appreciated! Does anyone here have CherryPy
working on Windows?

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20070501/7e41bb8a/attachment.html 


More information about the Python-win32 mailing list