[IronPython] IronPython/NWSGI 0-byte 200/404 response with HelloWorld?

Markus Törnqvist mjt at nysv.org
Fri Sep 18 23:31:05 CEST 2009


Hi!

I asked this question on
http://nwsgi.codeplex.com/Thread/View.aspx?ThreadId=69422

but to be better safe than sorry I'll ask this list too, sorry
about the copypasta :)

The platform is Windows 2003 Server, meaning IIS6, and IronPython 2.6 (because
I'm hoping this will all lead up to Django, and that seems to want 2.6 :)

I installed NWSGI-1.0-x86.msi, with the Hello World example.

Created C:\Inetpub\wwwroot\Hello\

Copied hello.wsgi there

Created C:\Inetpub\wwwroot\Hello\bin\

Copied NWSGI.dll there

Copied IronPython.dll, IronPython.Modules.dll, Microsoft.Scripting.Core.dll
and Microsoft.Scripting.dll

Copied Web.Classic.config into C:\Inetpub\wwwroot\Hello\ and renamed it to
Web.config

Now it gets hairy ;)

1)

I'm assuming that when the readme says "If the server is running IIS6, it
needs a script mapping for *.wsgi that forwards it to the ASP.NET ISAPI dll."
you do not mean the kind of xml definitions in
http://nwsgi.codeplex.com/Thread/View.aspx?ThreadId=60416 but instead
something in IIS to point to C:\Inetpub\wwwroot\Hello\bin\NWSGI.dll

What made sense was Default Web Site -> Properties -> ISAPI Filters.

There I created a new filter called asdf with the above path as the
executable. I also changed the home directory to the Hello one, because
without it, the ASP.NET Property tab would have a broken path for web.config,
and the field in the form is not editable.

After restarting IIS I just get an empty response, but Firebug on Firefox
tells me it's code 200.

2)

So I removed the ISAPI Filter, went to Home Directory -> Configuration button,
added executable NWSGI.dll and extension .wsgi in the Mappings tab.

Now http://localhost/ shows me a directory list! However, both hello.wsgi and
Web.config give me 404(!) though the web subdir works and I can download DLLs
from there.

3)

I reset the changes; I reset the Home Directory to C:\Inetpub\wwwroot and
remove the NWSGI extension/executable.

The Hello directory is visible already :o And all the good stuff is prohibited
:o

New Virtual Directory -> Alias Hello -> Location C:\Inetpub\wwwroot\Hello\ ->
Read & Execute

So I access http://localhost/Hello/ (Listing is denied) and
http://localhost/Hello/hello.wsgi (404)

Then to the Virtual Directory tab -> Configuration button -> Mappings tab
where I added the .wsgi extension with the NWSGI.dll executable. Still 404 :(

(I also noticed that the URL seems case-insensitive wrt /Hello/ and /hello/,
which seems a bit buggy, but whatever :)

Where did I go astray? Any ideas?

Thanks!!

-- 
mjt




More information about the Ironpython-users mailing list