0

trying to place my project in production with iis I get an error trying to access from my own computer with the browser:



Error occurred while reading WSGI handler: Traceback (most recent call last): File "c:\users\e10136\appdata\local\programs\python\python36-32\lib\site-packages\wfastcgi.py", line 791, in main env, handler = read_wsgi_handler(response.physical_path) File "c:\users\e10136\appdata\local\programs\python\python36-32\lib\site-packages\wfastcgi.py", line 633, in read_wsgi_handler handler = get_wsgi_handler(os.getenv("WSGI_HANDLER")) File "c:\users\e10136\appdata\local\programs\python\python36-32\lib\site-packages\wfastcgi.py", line 616, in get_wsgi_handler raise ValueError('"%s" could not be imported%s' % (handler_name, last_tb)) ValueError: "C:\inetpub\wwwroot\vp_canales" could not be imported StdOut: StdErr:

when I access from another computer it says:

Server Error 500

Any idea how I can handle the error?

Anthony
  • 57
  • 1
  • 10
  • You can only run Python apps on IIS/Azure using HttpPlatformHandler, https://blogs.msdn.microsoft.com/azureossds/2017/09/01/django-app-with-httpplatformhandler-in-azure-app-services-windows/ FastCGI support is designed for PHP only. – Lex Li Mar 26 '18 at 21:01
  • @LexLi that's not correct, FastCGI is for far more than just PHP. It is possible to run WSGI apps (such as django) through FastCGI on IIS. That's exactly what [Microsoft's wfastcgi](https://pypi.python.org/pypi/wfastcgi) does. – sytech Mar 26 '18 at 21:06
  • "wfastcgi" is managed by Microsoft's Python team, while HttpPlatformHandler from IIS/Azure team. So when I am hosting a web app on IIS/Azure, I would rather trust the latter, which has been tested not only for Python, but also Java/Ruby and many other app types. Anything open sourced by Microsoft (like wfastcgi) usually receive limited technical support, but you might ping wfastcgi developers to see if they have some troubleshooting guides for you. – Lex Li Mar 26 '18 at 21:15

0 Answers0