durusmail: quixote-users: Re: R: [Quixote-users] Serving quixote through iis
Serving quixote through iis
2005-10-06
Serving quixote through iis (while fixing a Quixote-WSGI bug)
Re: R: [Quixote-users] Serving quixote through iis (while fixing a Quixote-WSGI bug)
2005-10-06
2005-10-06
2005-10-06
2005-10-06
2005-10-07
Re: R: [Quixote-users] Serving quixote through iis
2005-10-07
Re: R: [Quixote-users] Serving quixote through iis
2005-10-07
Re: R: [Quixote-users] Serving quixote through iis
Patrik Simons
2005-10-07
On Fri, 07 Oct 2005 11:40:23 +0200 Daniele Varrazzo 
wrote:
> > > Did anybody face the same problem and has some tip to share, or
> > some scar to show, about that?
> >
> > Scar indeed.
> >
> > I have used SCGI-CGI (http://arbutus.physics.mcmaster.ca/dmc/software/)
> > together with a python scgi server installed as a service.
> > However, SCGI-CGI needs heavy patching to compile under mingw32 and
> > IIS has some annoying CGI bugs.
> >
> > For example, if the status code of the http response is anything but
> > 200, then IIS 5 will replace the response with its own. IIS 6, on the
> > other hand, also replaces the response but doesn't touch the
> > content-length header, leaving your browser waiting for data that won't
> > arrive if your response happens to be longer than the IIS default one.
> >
> > The workaround is to strip away the content-length header before
> > passing the response to IIS. This way your redirects will work
> > again. You'll have to use status code 200 for all the other error
> > pages. Also note http://support.microsoft.com/kb/q176113/
>
> I wasn't for the scgi-cgi solution both for the lack of tests under win32
> and because, even if the script is short, Python is not so quick to start.
> ISAPI is more natural in IIS environment and i'm for it (if Apache is not a
> solution, of course)
>
> Does the content length / and status code issues apply to isapi too?

No.

> > Lately, I've been using an isapi extension instead. This lets me access
> > all the IIS specific server variables as environment variables in the
> > request. See http://www.neotide.fi/quixote/
>
> Thank you very, *very* much! Actually, i was just thinking about rolling my
> own isapi_handler. I am glad WSGI let Quixote run into IIS, but now that i
> know it is possible, i feel the extra layer unneeded (ungrateful!!!):
>
> * IIS
> * isapi
> * isapi_wsgi
> * wsgi_handler
> * quixote publisher
>
> I also feel the single-threaded nature of isapi-wsgi a bottleneck: i already
> run a multithread Quixote into Apache and i'd try the same with IIS.
>
> Thank you very much again: i will surely test your solution.

You will probably want to change the helper functions to set some
additional attributes in the virtual directory so that you don't have
to fiddle with the Internet Service Manager GUI all the time. I use
the following to get integrated authentication for an intranet
application and then I check get_request().get_environ('LOGON_USER').

Pseudo-patch:
+
+def set_authentication(params, options, webdir=None):
+    if webdir:
+        webdir.AuthNTLM = True
+        webdir.AuthAnonymous = False
+        webdir.SetInfo()
@@
     vd = install.VirtualDirParameters(Name=name,
                                       Description=description,
                                       ScriptMaps=sm,
-                                      ScriptMapUpdate='replace')
+                                      ScriptMapUpdate='replace',
+                                      PostInstall=set_authentication)

--
Patrik
reply