[python-win32] Python and ASP - failure on 2nd and subsequent page loads

Jon Southard JSouthard at IntouchHealth.com
Mon Oct 5 21:01:33 CEST 2009

I would be grateful for any advice about a problem which is preventing me from using Python for my current project.

I am hoping to use Python 2.6 on the server side with Microsoft ASP [not ASP.NET; version details below]. The behavior I see is:

1. Load very simple page [text below] into browser [Firefox or IE, versions below]. Everything displays, fine.
2. Exit browser, restart it, and reload the same page; or open a second tab and load the same page.
3. In either case, page fails to load, with error:
Python ActiveX Scripting Engine, ASP 0211 (0x80020009)
A built-in ASP object has been referenced, which is no longer valid.
If I edit the page in any way, or just 'touch' it, and refresh the browser, the page will load correctly the first time, and then fail again as described.

The page I am using has no actual Python scripting, just the LANGUAGE directive and then the html and body tags with a little plain text.  Of course, things don't get any better if I put in some actual Python.

I found a five-year-old newsgroup posting with what seemed to be a similar (but not identical) problem. This thread said that the problem went away if server-side debugging was turned off. I have it turned off, no effect. I also tried adding some Response object settings to disallow cacheing, but these did not have any effect.

Version Info:

Python: 2.6.2
PyWin: pywin32-214 (I ran the client\pyscript.py and server\axsite.py scripts for setup)
Client OS: Windows XP Pro SP2
Browsers: Firefox 3.0.14, IE 8.0.6 [identical bug]
Server: IIS 5.1

Note, I also tried using Python 3.1 with corresponding pywin, but I could not get that to work with ASP at all; just got server 500 errors. I'd prefer to use 2.6 anyway since I am fairly new to Python.

I would be very grateful for any expert pointers on this, since if I can't solve it I will probably have to go use PHP, Javascript, or something else. Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20091005/b673b462/attachment-0001.htm>

More information about the python-win32 mailing list