Django 1.9 fastcgi IIS fails
See original GitHub issueI’ve published my Django application to IIS after upgrading Django installation locally , in my virtualenv, and on the server. I just finished migrating my application from Django 1.6 to 1.9 and in DEBUG everything seems to work fine. The published application fails to run:
Error occurred while reading WSGI handler:
Traceback (most recent call last):
File "c:\python27\Lib\site-packages\wfastcgi.py", line 791, in main
env, handler = read_wsgi_handler(response.physical_path)
File "c:\python27\Lib\site-packages\wfastcgi.py", line 633, in read_wsgi_handler
handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
File "c:\python27\Lib\site-packages\wfastcgi.py", line 605, in get_wsgi_handler
handler = handler()
File ".\ptvs_virtualenv_proxy.py", line 102, in get_virtualenv_handler
handler = get_wsgi_handler(os.getenv('WSGI_ALT_VIRTUALENV_HANDLER'))
File ".\ptvs_virtualenv_proxy.py", line 76, in get_wsgi_handler
handler = getattr(handler, name)
AttributeError: 'module' object has no attribute 'wsgi'
Cant find the problem
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Django on IIS 10 error 500.0
i am new with django and trying to install an application on IIS in ... FastCGI support is deprecated and will be removed...
Read more >The FastCGI process exited unexpectedly - (Django iis ...
This is a FastCGI problem, I suggest you check the log on the python side, there should be detailed error messages. – samwu....
Read more >Installing Django on IIS: A Step-by-Step Tutorial
Install the Tracing feature for IIS, then configure it for the Django site in Failed Request Tracing Rules to trace all content (),...
Read more >Running a Django Application on Windows Server 2012 with IIS
Configure FastCGI in IIS · Open the IIS Manager by clicking the Windows button, clicking on Administrative Tools, and double-clicking Internet ...
Read more >Django on IIS: Debugging IIS Error due to FastCGI request ...
I'm trying to host a Django web application on a windows 10 machine with IIS 10 with FastCGI. Whilst everything is running good...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found the problem! My virtualenv contained files from an earlier version of Django because Publishing from Visual Studio did not delete remote files that no longer exist in my project’s virtualenv. I just enabled deleting of remote files in my publish config and then it worked.
I vaguely recall the WSGI handler stuff changing at some point in a Django update?
I created a new django project, and the handler looks like:
DjangoWebProject7.wsgi.application
(as seen in DjangoWebProject7/settings.py)And there’s a DjangoWebProject7/wsgi.py that looks like this:
If your WSGI_HANDLER doesn’t look like that in your web.config or you don’t have a wsgi.py, then that would be the first thing to try.