Brief summary: on a web site hosted on an IIS server, standalone Python files render correctly, but using Python within an .aspx page (as opposed to, say, VB) causes an error, stating that Python is not a supported language, despite having (apparently) registered it with the ActiveX Scripting Engine. I'd like to make Python a supported language.
Further details: I have a web site hosted on an IIS 6.1 server, which can interpret and display .aspx files correctly. I wish to use Python as a language within the .aspx files, rather than VB as I have been up till now.
I've managed to get standalone Python pages to render correctly - for instance, a file on the site that contains the following code:
print 'Content-type: text/html'
print
print '<HTML><HEAD><TITLE>Python Sample CGI</TITLE></HEAD>'
print '<BODY>'
print '<H1>This is a header</H1>'
print '<p>' #this is a comment
print 'See this is just like most other HTML'
print '<br>'
print '</BODY>'
(source) renders correctly, when requested in a web-browser, as
This is a header
See this is just like most other HTML
However, when I try to embed Python code into an .aspx page, such as the following:
<%@ Page Language = "Python" %>
<%
Response.Write("Python lives in the ASP delimeters!")
%>
<br />
<script language="Python">
document.write("Python's throwing a party on the client-side!")
</script>
<br />
<script language="Python" runat="server">
Response.Write("Python gets ready to rumble inside a server-side scripting block!")
</script>
(source) I get the following error:

(Note that I've added "Page" in the first line to the example code - I've tried it both with and without, getting the same error both times)
It seems I need to register Python as a language for use in .aspx files. Does anyone have any tips on what I might be missing? I followed all the steps in the 1st link above (although I used ActivePython instead of CPython), which led me to the stage of .py files rendering correctly, but sadly this (otherwise excellent) answer ends there.
I've run C:\Python27\Lib\site-packages\win32comext\axscript\client\pyscript.py, which output "Registered: Python", but C:\Python27\Lib\site-packages\win32comext\axscript\Demos\client\asp\tut1.asp renders as a blank page, instead of the 5 increasingly larger "Hello World"'s I would expect from the source code. I've seen a recommendation here to run pyscript in debug mode, but I can't find how to view the output.
I've also looked at this page on the Microsoft Knowledge Base, which seems somewhat out of date - for instance, several of the descriptions of options/selections have changed names or locations.
EDIT: I've seen suggestions (here, at the bottom, and here ) claiming that the problem is with recent versions of ActivePython. I duly uninstalled ActivePython, downloaded CPython 2.7 and the Win32 Extensions, and went through the whole process again, with the same result - .py files render properly, but attempting to use Python within an .aspx file gives the error "Python is not a supported language".