I was following these steps for setting up django on IIS8. I got till the end of the documentation but when i ran the localhost on port 8003, i was getting the following error:
Error occurred while reading WSGI handler:
Traceback (most recent call last):
File "C:\inetpub\wwwroot\Django\[myprojname]\wfastcgi.py", line 710, in main
env, handler = read_wsgi_handler(response.physical_path)
File "C:\inetpub\wwwroot\Django\[myprojname]\wfastcgi.py", line 567, in read_wsgi_handler
return env, get_wsgi_handler(handler_name)
File "C:\inetpub\wwwroot\Django\[myprojname]\wfastcgi.py", line 538, in get_wsgi_handler
handler = getattr(handler, name)
AttributeError: 'module' object has no attribute 'wsgi'
StdOut:
StdErr:
Can anyone let me know why it wouldn't give me the same output as shown in the tutorial?
Apparently pip install django does not set the proper permissions for IIS to use the libraries it downloaded.
You need to find your Python folder (C:\python27 by default) and forcibly reset the permissions, i.e. Replace all child object permissions with inheritable permissions from this object as shown here:
https://serverfault.com/questions/475612/replace-permission-entries-on-all-child-objects-using-icacls
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With