Python as CGI on IIS and Windows 2003 Server

L

lothar.sch

Hi,

My python scripts are running as cgi scripts on an IIS on Windows XP.
I have to distribute it to IIS on Windows 2003 Server.
I tried to set python as cgi scripts in IIS on this machine in IIS
using advices from http://python.markrowsoft.com/iiswse.asp

No test with or without any " let the IIS execute python scrits as cgi.
Http Error code is 404 (but i'm sure that the file exists in the
requested path).

Is there any difference for python as CGI on IIS between Windows XP
prof. and Windows 2003 Server?

Thanks
Lothar
 
J

jean-marc

Hi,

My python scripts are running as cgi scripts on an IIS on Windows XP.
I have to distribute it to IIS on Windows 2003 Server. ....
Is there any difference for python as CGI on IIS between Windows XP
prof. and Windows 2003 Server?
....

Yes there is a difference!

I had this problem last year (developing on Win XP Pro and delivering
on IIS Server), I'll try to lookup the solution, but it might be
difficult (it's kind of a thing you do once and forget about later.)

Jean-Marc
 
J

jean-marc

Some bits are coming back to me: the problems stemmed from adresses -
getting the root of IIS was different so accessing files didn't work
the same way. I'm also quite positive that my desktop (developement
version) was IIS 5.1 which comes with XP Pro compared to 6.0 for IIS
Server. I changed the way I was dealing with file adresses.

Maybe there is a hint of direction for your own investigation...

Jean-Marc
 
L

lothar.sch

jean-marc said:
Some bits are coming back to me: the problems stemmed from adresses -
getting the root of IIS was different so accessing files didn't work
the same way.

thanks for that.
you are right, IIS versions are different.
Wich kind of adresses do you mean, http-adresses or paths in file
systems to root of IIS or to pythonscripts below IIS' root?

Unfortunately I couldn't find a way to solve the problem.


regards
Lothar
 
J

jean-marc

thanks for that.
you are right, IIS versions are different.
Wich kind of adresses do you mean, http-adresses or paths in file
systems to root of IIS or to pythonscripts below IIS' root?

Unfortunately I couldn't find a way to solve the problem.


regards
Lothar

I think it was due to the way of getting a reference to the IIS's root
- I think that all adresses in html (wheter from static documents or
those generated by python) need to use relative adresses (double dot
slash, or dot slash type of adresses).

If it still doesn't work maybe posting some culprit code could help
figure it out...!

Jean-Marc

May
 
A

and-google

Lothat said:
No test with or without any " let the IIS execute python scrits as cgi.
Http Error code is 404 (but i'm sure that the file exists in the
requested path).

Have you checked the security restrictions? IIS6 has a new feature
whereby script mappings are disabled by default even if they are listed
in the configuration list.

To turn CGI on, go to the IIS Manager snap-in and select the 'Web
Service Extensions' folder. Select 'All Unknown CGI Extensions' and
click 'Allow'.

Incidentally, the string I am using is:

"C:\Program Files\Python\2.4\python.exe" -u "%s" "%s"
 

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

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top