> 1. Adding a script to IIS Admin does NOT add the defintition for the
> whole server. I had to add it to the virtual directory, and since I have
> to add it to EVERY virtual directory (it appears) I am unhappy with IIS
5.0
No, I think you have it misconfigured. IIS has an inheritance hierarchy for
configuration values -- values set at the root are inherited in the children
nodes unless the children nodes override it.
So, if you add .py at the global level, all websites which did not override
the script mapping would automatically inherit settings without a problem.
The UI will also warn you of which sites are overriding the global settings
when you're setting the value (it'll pop up a little dialog asking you
permission to override the setting on a list of websites).
If you're doing this via commandline/script, it is presumed that you are
advanced enough to be aware of the issues.
> 2. There was a SECOND problem where a script executed by IIS would be
> passed parameters like:
>
> d:\Python23\python.exe D:\Documents and Settings\mark\Web\test.py
> Dear folks at MS, this sucks. I can't control this. Unless you want to
> make spaces in filenames illegal (fat chance), you have to help me out
> when there are spaces in the SINGLE PARAMETER that YOU pass to me.
> I can fix this with setting the script path in IIS to:
> d:\Python23\python.exe "%s" %s
Be safe. Put "" around both %s.
This is nothing special here -- this is exactly as Windows has always
behaved. Namely, spaces separate commandline parameters, unless you glob
the space together with a ". You will note that in Windows, " (double
quote) is an invalid filename...
> I feel that if IIS is passing a path, and it's got spaces, then IIS
> ought to add the quotes on it's own. Seriously. What command could
> possibly tell that those three things on the command line are really
> supposed to be one? Only IIS knows this (or any caller, but here we are
> discussing IIS).
No. This is an issue ONLY because we're talking about CGI and there is
commandline parameter passing and globbing considerations. I think that it
is completely up to the user to delineate the proper commandline parameter
globbing when configuring the server. After all, given an arbitrary
sequence of words separated by spaces, it would be impossible for any
program to discern what is the executable, what is the path, and what is the
script. It is in the user's best interest to delineate those boundaries
correctly.
Incidentally, with an ISAPI (the preferred extension method of IIS), this is
completely a non-issue -- we took care of it by giving you one variable to
retrieve the script name.
> Please add the quotes guys. Seriously: who do I submit a bug report to?
> This needs to be changed.
You can try to file a bug during the public beta, but I am doubtful of this
request. IIS is absolutely not going to parse the commandline and insert
stuff for you. As soon as we start doing that, it opens up an avenue of
canonicalization attacks -- the liability is not worth the gains. This
would also open up potential bugs with existing scriptmappings that already
have "%s".
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: %1 is not a valid Win32 application?