« Previous Next »

Answered Thread: Python 3.1 and IIS7

Last post 11-09-2009 7:40 PM by cdqrain. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 08-05-2009, 5:53 AM

    • azfarhus
    • Not Ranked
    • Joined on 08-04-2009, 7:19 AM
    • Posts 3

    Python 3.1 and IIS7

    I am trying to configure active python by following it

    http://forums.iis.net/t/1122937.aspx

    but I am getting 4.4.3 not found error.

    here is my script map

    C:\Python\Python.exe %s %s

    I choose no when it ask for isapi and cgi restriction.

  • 08-06-2009, 12:42 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Answered Re: Python 3.1 and IIS7

    You need the entry in the ISAPI/CGI restriction list - you need to either allow the UI add it automatically or add it yourselves manually.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 11-07-2009, 4:50 AM In reply to

    • cdqrain
    • Not Ranked
    • Joined on 11-07-2009, 4:42 AM
    • Posts 2

    Re: Python 3.1 and IIS7

    hi anilr

    i have config the python also following http://forums.iis.net/t/1122937.aspx. my python version is 3.1

    but when i browse the test.py, it appears the bad gateway error:

    HTTP Error 502.2 - Bad Gateway
    The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "".

    Module CgiModule
    Notification ExecuteRequestHandler
    Handler Python
    Error Code 0x00000000

    this is my test.py code : #!/usr/bin/env python# -*- coding: UTF-8 -*-# enable debuggingimport cgitbcgitb.enable()print "Content-Type: text/plain;charset=utf-8"printprint "Hello World!"

  • 11-09-2009, 12:32 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Python 3.1 and IIS7

    Does it work if you do the following from the command line?

    cd c:\inetpub\wwwroot (or wherever your site is located)
    c:\python\python.exe c:\inetpub\wwwroot\hello.py

    If that works, there is some issue with python launching in a non-interactive environment - the only way to figure that out would be for someone familiar with the python source code to debug this.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 11-09-2009, 7:40 PM In reply to

    • cdqrain
    • Not Ranked
    • Joined on 11-07-2009, 4:42 AM
    • Posts 2

    Re: Python 3.1 and IIS7

    hi, thanks.

    i downgrade the version to 2.5. and it works well.

Page 1 of 1 (5 items)
Microsoft Communities