I have read every article I could find on this topic but I'm still unable to run django project on IIS. The error message is 500 Internal Server Error, c:\program files (x86)\python 3.5\python.exe - The FastCGI process exited unexpectedly.
Tracing rule for error 500 provides the following:
Error
-FASTCGI_UNEXPECTED_EXIT
Warning
-SET_RESPONSE_ERROR_DESCRIPTION
ErrorDescription
c:\program files (x86)\python 3.5\python.exe - The FastCGI process exited unexpectedly
Warning
-MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName
FastCgiModule
Notification
EXECUTE_REQUEST_HANDLER
HttpStatus
500
HttpReason
Internal Server Error
HttpSubStatus
0
ErrorCode
The system cannot find the file specified.
(0x2)
environment:
- Windows Server 2012 R2
- IIS 8.5 (CGI enabled)
- wfastcgi installed and enabled (command "c:\program files (x86)\python 3.5\python.exe|c:\program files (x86)\python 3.5\lib\site-packages\wfastcgi.py" opens a python shell - is this right?)
web.config under c:\inetpub\wwwroot\testapp:
<configuration>
<system.webServer>
<handlers>
<add name="Python FastCGI" path="*" verb="*" modules="FastCgiModule" scriptProcessor="c:\program files (x86)\python 3.5\python.exe|c:\program files (x86)\python 3.5\Lib\site-packages\wfastcgi.py" resourceType="Unspecified" requireAccess="Script" />
</handlers>
<tracing>
<traceFailedRequests>
<add path="*">
<traceAreas>
<add provider="ASP" verbosity="Verbose" />
<add provider="ISAPI Extension" verbosity="Verbose" />
<add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI,WebSocket" verbosity="Verbose" />
</traceAreas>
<failureDefinitions statusCodes="500" />
</add>
</traceFailedRequests>
</tracing>
</system.webServer>
<appSettings>
<!-- Required settings -->
<add key="WSGI_HANDLER" value="django.core.wsgi.get_wsgi_application()" />
<add key="PYTHONPATH" value="c:\inetpub\wwwroot\testapp" />
<!-- Optional settings -->
<add key="WSGI_LOG" value="C:\inetpub\logs\testapp.log" />
<add key="WSGI_RESTART_FILE_REGEX" value=".*((\.py)|(\.config))$" />
<add key="APPINSIGHTS_INSTRUMENTATIONKEY" value="__instrumentation_key__" />
<add key="DJANGO_SETTINGS_MODULE" value="testapp.settings" />
</appSettings>
</configuration>
thanks for any help.