[python-win32] IIS ASP webpage issues with minimal pyscript

Steven Manross steven at manross.net
Sun May 22 01:36:28 EDT 2022


I'm not sure what changed this time except that I renamed my C:\Python310 dir to C:\Python310--- after uninstalling and rebooting so it would install in a fresh directory, but now my ASP scripts are working.  YAY!!

Have a great day.

Chalk another one up to leaving the problem for a few hours, and you finally figure out a way around it.  😊

Steven
-----Original Message-----
From: Steven Manross 
Sent: Saturday, May 21, 2022 6:28 PM
To: python-win32 at python.org
Subject: IIS ASP webpage issues with minimal pyscript

Howdy,

I have pywin32 ASP Scripts using Python 3.10.4 x64 (from Python.org) running on 2 servers.  Both are Win Server 2016 with the most recent patches.

I am using pywin32==304

One server runs pyscript in ASP fine, the other doesn’t (VBScript works fine both servers).

This is the page I am trying to render in Classic ASP:

<%@ LANGUAGE="Python"%>
<%
Response.Write('This is a test')
%>

Note: if I render that Classic ASP code on another server, it renders correctly.

If I make my ASP page just this....

<%@ LANGUAGE="Python"%>

No error appears, but obviously, I want to write something to the webpage, so sadly I have to debug this further.

This is the browser error I get from Chrome:

This site can’t be reached
The webpage at https://whatever.manross.net/mypage.asp might be temporarily down or it may have moved permanently to a new web address.
ERR_UNEXPECTED

In trying to debug this further, I found “DebugDiagx64” (a Microsoft tool) in order to trace the specific application pool I am having problems with (and enable diagnostic data when the apppool/process dies).

Here’s one of the trace analysis files it came up with (attached) and there were a total of 4 traces:
 * w3wp__debug-analysis.mht.txt (.txt was added in case MHT files are active content and stripped by anyone's servers).
     * Note: this analysis file renders in IE fine If you alter Internet Options -> Advanced -> Security -> Allow Active Content to run in files on My Computer (requires restart) to enabled
 * Iistrace-as-text.txt is just a text file where I pulled out some relevant data from the debugdiag analysis output presuming that not everyone has a windows system or wants to run that active content in a browser.

What I’ve tried in debugging this:
* run: python pyscript.py (and tried adding a --debug -- no errors on either running)
* run: python pywin32_postinstall.py --install (no errors)
* verified Application Pool does not have "Enable 32-bit Applications = True" (found out about that on the other server)
* created a new application pool and assigned it to the site, and made sure that it behaved the same..  it does (both don’t work).
* repaired the installation of Python 3.10.4 from "Add/Remove Programs"
* removed python and reinstalled python after a clean reboot
* iisreset.exe (stop/start IIS completely)
* reboot server a few times
* searching for answers on google for a few hours related to "App Pool crash" "Python" "Classic ASP" and more.
* reading the documentation: https://github.com/mhammond/pywin32/blob/main/README.md  again just in case 😊
* searched for pywintypes*.* and didn’t find any different versions that I thought would be a problem (note: some Intel SSD software has one in its personal application directory for python 2.7) Python itself is behaving just fine, and can instantiate COM objects as I have been testing/building "CertificateAuthority" python modules on this server in prep for creating a web page.  It's just when I start to make ASP pages that it goes crazy.

If anyone has suggestions, I can do just about anything to this PC at any time (other than del /s /q c:\*.*)  😊

Thanks for your time.

Steven


More information about the python-win32 mailing list