469,358 Members | 1,578 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,358 developers. It's quick & easy.

%1 is not a valid Win32 application?

Hi all, I followed some simple instructions to add python scrips to IIS
as a cgi. The instructions were here:

http://www.e-coli.net/pyiis.html

Unfortunately, when I try to run a test script, I get this message
displayed on my browser window:

%1 is not a valid Win32 application.

That's it! No 500 error, nothing else. I'm not sure what is generating
this message so I'm asking various groups here what might be the issue.

I'm totally at a loss how to move forward. Anyone know? I'll even take
vague suggestions at this point. ;)

Is this error message comming from IIS or is it possibly python? Note
my python instal seems to work ok (runs from command line just fine,
etc.) The test app I'm using (named test.cgi) right now is in a
directory that's already been linked to an IIS virtual directory, from
which I can run ASP scripts just fine. Permissions and ownership should
all be the same. (The permissions on the virtual directory from IIS are
Scrips and Executeables). The test script is here, should you care:

print "Content-type: text/html\n"
print "<h3>Hello World!</h3>"
print "<p>"
print "Well this is just a basic test, mkay?"
print "If this had been a real test there would have been lots more
here, mkay?"

Jul 18 '05 #1
3 11918
Just a quick update:

I decided to rename the extension for python scripts ".pycgi". Ok, so
when I did so, I decided to test. Result: with .pycgi in the IIS Admin
properties, test.cgi STILL returns "%1 is not a valid Win32
application." Wow. So it's like IIS is ignoring the .cgi rule I added
somehow.

Second, once I renamed test.cgi to test.pycgi, the file time is totally
unrecognized. My browser (Mozilla) declares the type of test.pycgi to
be unrecognized and askes me if I want to download instead. I even
added the .pycgi rule to the vitual directory where the script lives and
I get the same result.

Help!

Jul 18 '05 #2
Update #2:

Renamed the extension yet again, this time to .py. Mozilla seems to
recognize this as a text file and displays it, but IIS still doesn't
seem to catch the .py rule I added to the IIS Admin properties. The
script is still not being executed.

Win2K Pro, IIS 5.0. SP4 and current on all updates.

Man I hope someone can help, I'm really lost here. I think I'll try to
add perl as a script just to see if I can get it to work.

Jul 18 '05 #3
Mark Space <ma**********@hotmail.com> wrote in message news:<vo************@corp.supernews.com>...
Update #2:

Renamed the extension yet again, this time to .py. Mozilla seems to
recognize this as a text file and displays it, but IIS still doesn't
seem to catch the .py rule I added to the IIS Admin properties. The
script is still not being executed.

Win2K Pro, IIS 5.0. SP4 and current on all updates.

Man I hope someone can help, I'm really lost here. I think I'll try to
add perl as a script just to see if I can get it to work.


Hmm... have you checked your system's environment variables? This
error message sounds like maybe "PATHEXT" needs to be set to include
".PY" (to make Python scripts executable)... although having no
experience with IIS whatsoever this is only a stab in the dark, and
bursts of sudden pigeons might still be lurking.

--
Christopher
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Pradeep D | last post: by
1 post views Thread by Pradeep D | last post: by
6 posts views Thread by =?Utf-8?B?TWVsaXNzYQ==?= | last post: by
reply views Thread by Gianluca Pezzoli | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.