[Tutor] Using Python instead of VB in ASP with IIS

Sam Corder samus@feudalkingdoms.tzo.org
Wed, 16 May 2001 20:49:11 +0000


I'm wondering if you have a permissions problem.  Verify that the iusr account has 
access to the python directories and everything.  You can also check your NT logs 
for any hints there.  Others in c.l.python may be able to help as well.

-Sam

kent@springfed.com, samus@feudalkingdoms.tzo.org wrote:
>
>Even an ASP consisting of just the single line
><%@ LANGUAGE =3D Python%>
>
>blows up with 500 Server Error ...
>Kent
>On Wed, 16 May 2001 17:56:37 +0000, Sam Corder wrote:
>It sounds like Python is registered as an active scripting=
> language since they run
>in IE.  Here is a very simple example script for asp.
><%@ LANGUAGE =3D Python%>
><%
&gt;Response.Write('Hi')
&gt;%>
>You may want to turn off friendly error messages in IE.  Also if=
> the simple script
>above works then it may be your code.  Turning off the friendly=
> error messages
>should show you what actually blew up.  Another gotcha for=
> python/asp is that code
>embedding like
><%
&gt;if something =3D=3D 1:%>
>this is a para with <%=3D    myvar%> code
><%
&gt;else:
&gt;    pass
&gt;%>
>this is a para without embedded code.
>Won't work because the asp engine doesn't transmit the white=
> space in <%=3D %>to
>python.  I guess this has the advantage of keeping most of your=
> code outside of the
>html.  I have a couple more complex examples if you want them. =
> We mainly use
>python and the Reportlab package to generate pdf reports and=
> stream them down to
>the browser.
>-Sam
>kent@springfed.com, tutor@python.org wrote:
>>
>>My situation is:
>>1) running Win2K Advanced Server
>>2) installed ActiveState distribution
>>3) ran python\win32comext\axscript\client\pyscript.py
>>4) pages with <script language=3D3D"Python">=3DA0(i.e.,=
> client-side=3D
>> Python) run
>>correctly in IE
>>5) ASP pages with <%@ Language=3D3DPython %>=3DA0always fail with=
> error=3D
>> 500 Server
>>Error
>>6) ASP pages with <SCRIPT RunAt=3D3DServer=
> Language=3D3DPython>=3DA0blocks=3D
>> always fail
>>with error 500 Server Error
>>-Sam
>>kent@springfed.com, tutor@python.org wrote:
>>>
>>>Howdy,
>>>Is there a convenient source of info on the
>>>configuration required to allow server side
>>>ASP pages to employ Python code?
>>>Thanks,
>>>Kent
>>>-- Kent Tenney, kent@springfed.com on 05/16/2001
>>>_______________________________________________
>>>Tutor maillist  -  Tutor@python.org
>>>http://mail.python.org/mailman/listinfo/tutor
>>-- Kent Tenney, kent@springfed.com on 05/16/2001
>>_______________________________________________
>>Tutor maillist  -  Tutor@python.org
>>http://mail.python.org/mailman/listinfo/tutor
>_______________________________________________
>Tutor maillist  -  Tutor@python.org
>http://mail.python.org/mailman/listinfo/tutor
>-- Kent Tenney, kent@springfed.com on 05/16/2001