IIS python web application mapping issue - resolved

Discussion in 'Python' started by davidj411, Apr 3, 2009.

  1. davidj411

    davidj411 Guest

    i searched the internet for an hour , never found this info, and
    figured it out myself.
    posting this so that others won't have to look so hard.

    ran across this issue and it seems that nobody really documented this
    correctly on http://support.microsoft.com/kb/276494

    in IIS i could not add the "python mapping" to the web mappings like
    this:
    "c:\<your python path>\python.exe -u %s %s"


    windows said the file does not exist, even when i unchecked the option
    to make sure it exists (and it does exist!).

    it would not allow the arguments, i.e. it allowed the mapping when i
    just used "c:\<your python path>\python.exe".

    solution was to do it like this:
    c:\<your python path>\python.exe -u "%s %s"

    making the arguments have there own set of quotes.


    remember to also do the following
    have web service extensions enabled for cgi.
    register python using pyscript.py.

    thanks!

    David
     
    davidj411, Apr 3, 2009
    #1
    1. Advertising

  2. davidj411

    davidj411 Guest

    I thought i was being clever but not only did i typo , but it does not
    work with the "-u" for unbuffered option.

    remove the "-u" to avoid the ugly message:

    CGI Error
    The specified CGI application misbehaved by not returning a complete
    set of HTTP headers.

    I am going to use the CGI script to upload files (.exe and .zip files)
    and had read that "-u" would be needed.

    i am going to need to research how this is done now that "-u" is a
    known issue with IIS.
    i think that i will need to baseencode64 the data before writing it to
    a file. not sure really...
    any thoughts are appreciated.
     
    davidj411, Apr 3, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brano
    Replies:
    0
    Views:
    763
    Brano
    Jan 6, 2006
  2. Brano
    Replies:
    0
    Views:
    903
    Brano
    Jan 6, 2006
  3. Rob Goodwin
    Replies:
    0
    Views:
    105
    Rob Goodwin
    Feb 14, 2007
  4. Rob Goodwin
    Replies:
    1
    Views:
    182
    Rob Goodwin
    Feb 15, 2007
  5. Replies:
    1
    Views:
    107
    J. Gleixner
    Jun 8, 2007
Loading...

Share This Page