1

Recently I've configured a Django site in a virtualenv on windows server 2016 with IIS and fastcgi. This was done with a user account that was later replaced by a technical account(has more rights). The site ran and still runs great.

The problem now is that with this new technical account I can not configure a new site following the exact same steps. It keeps throwing a 500 error when visiting the site. If I change the web.config file to point to the original venv it works. It seems wfastcgi capabilities are locked to virtual env's created by that original user account.

I've double checked the app pool permissions on the folder with the new virtual environment and site, they are exactly the same as the original folder. I've checked with a monitoring application if there's access denied errors for this new folder, this seems not be the case. I've double checked the web.config file, it points to the correct wfastcgi script and python.

Could it be since I installed Fastcgi under the old account it's operations are fully locked onto this account?

MatthiasTT
  • 39
  • 6
  • Could you share the detailed information error snapshot? check the sub status code in iis logs which is located at %SystemDrive%\inetpub\logs\LogFiles. you can also use [failed request tracing](https://learn.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis) for more detail. – Jalpa Panchal Sep 27 '19 at 07:30
  • Thank you for the tip. I've configured the tracing and if I'm looking in the files I see some errors: -Access is denied. (0x80070005) -401 - Unauthorized: Access is denied due to invalid credentials. But I can not see exactly at what stage this happens and to what folder. – MatthiasTT Sep 30 '19 at 14:29

1 Answers1

1

After spending hours digging through forums I found a fix. wfastcgi is only supported up till Python version 3.6. I had the website running initially with Python 3.7 but this was not replicable for some reason.

After switching to Python 3.6 the problem of wfastcgi failing was fixed.

MatthiasTT
  • 39
  • 6