IIS python web application mapping issue - resolved

D

davidj411

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
 
D

davidj411

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,052
Latest member
KetoBeez

Latest Threads

Top