Yes. Isapi-wsgi is confirmed running on all modern versions of Windows, including Server 2008, Server 2008 R2, and Windows 7. For all of these later versions, you must have the IIS 6 Metabase Compatibility feature installed. That is probably the issue. Can you double-check you have that feature installed and report back if that doesn’t fix it?
--
You received this message because you are subscribed to the Google Groups "isapi_wsgi-dev" group.
To post to this group, send email to isapi_w...@googlegroups.com.
To unsubscribe from this group, send email to isapi_wsgi-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/isapi_wsgi-dev?hl=en.
I recently did an install to Windows Server 2008 R2, and ran into a number of issues. From scratch, here are some of the things I had to make sure I got right:
1) Match 32-bit and 64-bit Python/IIS. If you have a 64-bit IIS, you probably also need 64-bit Python (or configure the app pool for 32-bit apps; I chose the former with success).
2) Make sure Python is installed for all users. To double-check this, there should be a pythonXX.dll in \windows\system32.
3) You may need the Visual Studio 2008 redistributable (or 2008 SP1 redistributable) for the proper word size (I used 64-bit). I think I installed both, but the SP1 was sufficient (?).
When I was troubleshooting, I found that using the Dependency Walker tool was helpful. After installing, I would run it on the _app.dll and make sure it was able to load without errors. It was errors here that suggested I needed the Visual Studio redistributables.
Also, I always check the Application Event Log. It doesn’t always have helpful error messages, but sometimes it does.
Perhaps some of these suggestions will help.
Regards,
Jason
-------------------------------------- Randy Syring Intelicom Direct: 502-276-0459 Office: 502-212-9913 For the wages of sin is death, but the free gift of God is eternal life in Christ Jesus our Lord (Rom 6:23)
"Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module."This points to "IEFRAME.DLL." (Is this a dealbreaker? Do I need to fix this?)
Let me know if you have any ideas.The description for Event ID 4097 from source ISAPI Filter or Extension cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.If the event originated on another computer, the display information had to be saved with the event.The following information was included with the event:Failed to import callback module '_loader'The system cannot find the file specified.
Error SummaryHTTP Error 500.0 - Internal Server ErrorThe page cannot be displayed because an internal server error has occurred.Detailed Error InformationModule IsapiModuleNotification ExecuteRequestHandlerHandler ISAPI-WSGIError Code 0x80004005Requested URL http://jjfake.localhost:82/Physical Path C:\inetpub\satelliteEligibility2\wwwrootLogon Method AnonymousLogon User AnonymousMost likely causes:IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.IIS was not able to process configuration for the Web site or application.The authenticated user does not have permission to use this DLL.The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.Things you can try:Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.Check the event logs to see if any additional information was logged.Verify the permissions for the DLL.Install the .NET Extensibility feature if the request is mapped to a managed handler.Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
When I ran into the issue with IESHIMS.DLL, I was able to bypass the error by installing one of the Visual Studio 2008 redistributables. Ultimately, I did not need to include Internet Explorer in the path.
You can probably disregard any warnings about delay-load modules. I found once the errors were resolved, I no longer needed to fuss with the dependency walker.
The error you’re getting in the event viewer sounds to me like it’s unable to find _loader.py (but I may be interpreting it incorrectly). This suggests to me that perhaps there is something referenced by _loader.py that’s not readable by the IUSR or App pool identity.
When I’m troubleshooting, I often go back to the “test” example in \Python\Lib\site-packages\isapi\samples\test.py. I copy it to \inetpub\wwwroot, install it, and then confirm that it’s working through localhost/PyISAPITest. If it’s not working, then you still have ISAPI binary problems. If that works, then you can start to focus on the specifics of your Python app and its dependencies (or possibly isapi-wsgi/isapiwsgihelper).
Hope that helps.
> Failed to import callback module '_loader'
> The system cannot find the file specified.
This came up here recently - see
http://groups.google.com/group/isapi_wsgi-dev/browse_thread/thread/16f99d20a3e0ddf0
- while it doesn't seem to have a resolution, it does have about
everything I can contribute to the problem...
HTH,
Mark
http://code.google.com/p/isapi-wsgi/issues/detail?id=10
Trying to load 32-bit DLLs in a 64 bit app pool.
--------------------------------------
Randy Syring
Intelicom
Direct: 502-276-0459
Office: 502-212-9913
For the wages of sin is death, but the
free gift of God is eternal life in
Christ Jesus our Lord (Rom 6:23)
--
You received this message because you are subscribed to the Google Groups "isapi_wsgi-dev" group.
To post to this group, send email to isapi_wsgi-dev@googlegroups.com.
To unsubscribe from this group, send email to isapi_wsgi-dev+unsubscribe@googlegroups.com.
-------------------------------------- Randy Syring Intelicom Direct: 502-276-0459 Office: 502-212-9913 For the wages of sin is death, but the free gift of God is eternal life in Christ Jesus our Lord (Rom 6:23)
To post to this group, send email to isapi_w...@googlegroups.com.
To unsubscribe from this group, send email to isapi_wsgi-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/isapi_wsgi-dev?hl=en.
--
You received this message because you are subscribed to the Google Groups "isapi_wsgi-dev" group.
To post to this group, send email to isapi_w...@googlegroups.com.
To unsubscribe from this group, send email to isapi_wsgi-de...@googlegroups.com.
When I ran into the issue with IESHIMS.DLL, I was able to bypass the error by installing one of the Visual Studio 2008 redistributables. Ultimately, I did not need to include Internet Explorer in the path.
You can probably disregard any warnings about delay-load modules. I found once the errors were resolved, I no longer needed to fuss with the dependency walker.
The error you’re getting in the event viewer sounds to me like it’s unable to find _loader.py (but I may be interpreting it incorrectly). This suggests to me that perhaps there is something referenced by _loader.py that’s not readable by the IUSR or App pool identity.
When I’m troubleshooting, I often go back to the “test” example in \Python\Lib\site-packages\isapi\samples\test.py. I copy it to \inetpub\wwwroot, install it,
and then confirm that it’s working through localhost/PyISAPITest. If it’s not working, then you still have ISAPI binary problems. If that works, then you can start to focus on the specifics of your Python app and its dependencies (or possibly isapi-wsgi/isapiwsgihelper).
By “install it”, I mean run “python test.py install” (and it will create the hook DLL and register the script map for test.py on /PyISAPITest in the Default Web Site).
But you’ve managed to capture the problem a different way – by replacing _loader.py with the contents from test.py, you’ve essentially done the same thing.
And the fact that it’s working means your IIS/ISAPI/Python environment is set up correctly. Good job!
Also, adding the “import isapi_wsgi” causing the 500 indicates almost certainly that the IIS user is unable to read that package. I would double-check the permissions on Python\Lib\site-packages\isapi-wsgi*. Also, if isapi-wsgi is installed as a zipped egg (a single file and not a directory), I’ve seen the IIS identity not have permission to expand that zip file somewhere (necessary for some packages). More likely, though, it’s just a permissions issue.
Another very useful technique at this point (now that your Python environment is being invoked) is to add “import win32traceutil” at the top of the hook script. This will redirect all output to a special global buffer so you can view it in another process. Then, it a separate command-line window, run “python -m win32traceutil” and it will echo all messages that come into that buffer… so you can see any errors or output.
By “install it”, I mean run “python test.py install” (and it will create the hook DLL and register the script map for test.py on /PyISAPITest in the Default Web Site).
But you’ve managed to capture the problem a different way – by replacing _loader.py with the contents from test.py, you’ve essentially done the same thing.
And the fact that it’s working means your IIS/ISAPI/Python environment is set up correctly. Good job!
Also, adding the “import isapi_wsgi” causing the 500 indicates almost certainly that the IIS user is unable to read that package. I would double-check the permissions on Python\Lib\site-packages\isapi-wsgi*. Also, if isapi-wsgi is installed as a zipped egg (a single file and not a directory), I’ve seen the IIS identity not have permission to expand that zip file somewhere (necessary for some packages). More likely, though, it’s just a permissions issue.
Another very useful technique at this point (now that your Python environment is being invoked) is to add “import win32traceutil” at the top of the hook script. This will redirect all output to a special global buffer so you can view it in another process. Then, it a separate command-line window, run “python -m win32traceutil” and it will echo all messages that come into that buffer… so you can see any errors or output.
> * I had installed isapi_wsgi via pip, and it's in a bona fide directory.
> * I ensured IIS_IUSRS had read/execute permissions on the whole
> virtualenv.
I suspect the virtualenv is going to be the problem - when Python is
loaded by the IIS process, Python probably can't find that virtualenv -
it will end up looking in the reistry for the install path and attempt
to import from there - but that isn't going to be your virtualenv.
With win32traceutil in place, print your sys.path - I suspect you will
find directories other than what you expect. The simplest way forward
is probably to just install isapi_wsgi is your main Python install.
HTH,
Mark
I wonder if ISAPIWSGIHelper runs the activate_this.py script to activate the
virtualenv. If it doesn't, that might be something it could do.
In the meantime, Mark is probably right that the easiest thing would be to
install isapi-wsgi (and other dependencies) in the global site-packages.
> -----Original Message-----
> From: isapi_w...@googlegroups.com [mailto:isapi_wsgi-
> d...@googlegroups.com] On Behalf Of Mark Hammond
> Sent: Tuesday, 16 August, 2011 18:24
> To: isapi_w...@googlegroups.com
> Cc: Jamie Jackson
> Subject: Re: Cannot get isapi-wsgi working on Win Server 2008
>
> --
> You received this message because you are subscribed to the Google Groups
> "isapi_wsgi-dev" group.
> To post to this group, send email to isapi_w...@googlegroups.com.
> To unsubscribe from this group, send email to isapi_wsgi-
> dev+uns...@googlegroups.com.
# If you have isapi-wsgi installed in a different location or are not using
# a virtualenv, you CAN SAFELY MODIFY OR DELETE THE FOLLOWING TWO LINES.
from iwhelper.utils import prepend_site_dir
prepend_site_dir(__file__, '..', 'Lib', 'site-packages')
-------------------------------------- Randy Syring Intelicom Direct: 502-276-0459 Office: 502-212-9913 For the wages of sin is death, but the free gift of God is eternal life in Christ Jesus our Lord (Rom 6:23)