[IronPython] IronPython/NWSGI 0-byte 200/404 response with HelloWorld?
Markus Törnqvist
mjt at nysv.org
Sat Sep 19 20:43:31 CEST 2009
On Sat, Sep 19, 2009 at 10:44:10AM -0600, Jeff Hardy wrote:
>
>This needs to point to the aspnet_isapi.dll file, not NWSGI.dll. Just
>copy the path from the .aspx entry.
Ok, now I got back to this and got actually somewhat far!
Added the Wilcard Application Map to the correct DLL, and
the Home Directory to C:\Program Files\IronPython 2.6\Lib\site-packages\myapp
I also had to add the Microsoft.Scripting.ExtensionAttribute.dll,
Microsoft.Dynamic.dll and Microsoft.Scripting.Debugging.dll
to C:\...myapp\bin\
(The Debugging part is probably related to Full frames? when it was
missing the traceback showed something trying to access getframe() :)
Anyway, the PROBLEM is THIS:
osEnviron is obviously not available in medium trust, like said in
http://nwsgi.codeplex.com/Wiki/View.aspx?title=Configuration
Parser Error Message: Unrecognized element 'osEnviron'.
So I can't load Django's configurations!
http://msdn.microsoft.com/en-us/library/tkscy493.aspx
tells us something about <securityPolicy /> and <trust /> tags,
and I have the configuration below for comments.
Thanks for anything :)
<wsgi frames="Full">
<pythonPaths>
<path path="C:\Program Files\IronPython 2.6\Lib" />
<path path="C:\Program Files\IronPython 2.6\Lib\site-packages" />
<!-- PROBABLY REDUNDANT -->
<path path="C:\Program Files\IronPython 2.6\Lib\site-packages\django" />
<path path="C:\Program Files\IronPython 2.6\Lib\site-packages\myapp" />
</pythonPaths>
<osEnviron>
<variable name="DJANGO_SETTINGS_MODULE" value="myapp.settings" />
</osEnviron>
<wildcard callable="django.core.handlers.wsgi.WSGIHandler()" />
</wsgi>
<system.web>
<compilation debug="true" />
<httpHandlers>
<add verb="*" path="*" type="NWSGI.WsgiHandler, NWSGI, Version=1.99.2.0, Culture=neutral, PublicKeyToken=41e64ddc1bf1fc86" />
</httpHandlers>
<securityPolicy>
<trustLevel name="Full" policyFile="internal" />
<trustLevel name="High" policyFile="web_hightrust.config" />
<trustLevel name="Medium" policyFile="web_mediumtrust.config" />
<trustLevel name="Low" policyFile="web_lowtrust.config" />
<trustLevel name="Minimal" policyFile="web_minimaltrust.config"/>
</securityPolicy>
<trust
level="Full"
originUrl=""
processRequestInApplicationTrust="true"
/>
</system.web>
<!-- IIS 7 STUFF CUT OUT -->
--
mjt
More information about the Ironpython-users
mailing list