I got the following question about a month ago concerning CGI application map (scriptmap) configuration on IIS6.
Hi David, I'm having some issues configuring python CGI scripting for IIS 6. I was wondering if you have a canned response or web link giving detail to configuring Python on IIS 6. If not, I need some help to configure IIS properly. 1. I can add python.exe as a WSE but I cannot get it to be a recognized ext. type. So you have to enable all unknown cgi WSE's. 2. I don't know what settings from IIS 5.0 still apply to IIS 6.0 for python cgi's 3. Do you have a customized iisext.vbs(including parameters) script that successfully configures IIS 6.0 WSE's for python? 4. Are there any incompatibility issues that simply can't be resolved?
In general, you have the following choices to configure Web Service Extensions. Now, you need to be aware that with each configuration choice, you are using a different sort of namespace and slightly different encoding/syntax rules. This is how all systems work no matter the operating system; you just have to learn to live with and adapt to it. Some of the special characters that come into play in this situation are space, quote, and ampersand -- because they are encoded differently in various namespace and have different meanings. For example, spaces are used to delimit parameters on the commandline, yet are mere whitespace to XML that can be normalized away. Quote is used to delimit attribute values in XML but delimit commandline parameters with spaces on the commandline; hence you need to " escape them in XML if you wish to preserve its meaning. Ampersand delimit commandlines and denote parameter entities in XML, so you need to & escape them in XML.
iisext.vbs /AddFile "C:\Program Files\Python\Python.exe %s" 1 Python 1 Python
.py -> "C:\Program Files\Python\Python.exe" "%s"
C:\Program Files\Python\Python.exe "%s"
Note where you have " and where you do/not have ""s. Remember that editing metabase.xml requires either you either:
//David