Questions tagged [wfastcgi]

wfastcgi.py provides a bridge between IIS and Python using WSGI and FastCGI, similar to what mod_python provides for Apache HTTP Server. It can be used with any Python web application or framework that supports WSGI, and provides an efficient way to handle requests and process pools through IIS.

Microsoft developed this component as part of the Python extensions for Azure App Service on Windows initially.

Note that Microsoft has deprecated the Python extensions, so you should switch to Linux.

https://learn.microsoft.com/en-us/visualstudio/python/managing-python-on-azure-app-service?view=vs-2017

Important

Microsoft has deprecated the Python extensions for App Service on Windows as described in this article in favor of a direct deployment to App Service on Linux.

81 questions
2
votes
3 answers

Flask, wfastcgi, and IIS on Windows Server 2012

I am trying to deploy a flask service on IIS on Windows Server 2012. To arrive at this point: pip installed flask (Python versions 2.7 and 3 were already installed.) pip installed wfastcgi Ran wfastcgi-enable Established a new site under IIS Added…
twip
  • 638
  • 2
  • 9
  • 20
2
votes
2 answers

ValueError: "django.core.wsgi.get_wsgi_application()" could not be imported

I was setting up all paths in my web.config file and configuring everything in IIS (on Windows Server 2012 R2). When I was done I started the server and accessed the website. But while doing so I got this following error message: Error occurred…
Bedirhan
  • 89
  • 1
  • 5
1
vote
1 answer

The FastCGI process exited unexpectedly - (Django iis hosting)

I am following this tutorial to hosting my django application on windows IIS Manager. After following all steps from the tutorial I have got the following HTTP Error 500.0 - Internal Server Error Is there any way to solve the issue?? I didn't find…
iku
  • 133
  • 2
  • 9
1
vote
1 answer

Not able to run the command "wfastcgi-enable"

So I am trying to deploy a python Django project on windows server 2012R2. But when trying to run the command I get this error. When trying to open the link in IIS manager it show error 500. I am running command prompt as administrator but that…
1
vote
1 answer

Flask-Socket.IO (IIS): "WebSocket is closed before the connection is established."

The Technology Flask (Python) Flask-Socket.IO (using eventlet) WFastCGI IIS (Windows) The Problem I'm experiencing issues with Flask-Socket.IO whilst running on an IIS Web Server. I'm new to WebSockets so I'm well aware that I'm probably just…
lc-51
  • 99
  • 2
  • 7
1
vote
1 answer

wfastcgi-enable failed to create process

When I install python first time, wfastcgi-enable didn't have any problem. But when I uninstall and reinstall, it happened like this! Command Prompt C:\Windows\system32>pip install wfastcgi Collecting wfastcgi Using cached wfastcgi-3.0.0.tar.gz…
1
vote
2 answers

Long time to first byte for my Flask app homepage

I have a Flask site deployed to IIS via wfastcgi configuration. When I use chrome or firefox developer tools to analyse the loading time of the homepage, I find many seconds (ranging from 6 to 10 in average) as waiting time to receive the first…
user11323942
1
vote
2 answers

Unknown FastCGI error Occurred python web API

I am using python version 3.8 and IIS 7.0. When I try to host my python web api on the IIS server it encounter with the FastCGI error. I have enable CGI in IIS and also added System.WebServer>>handlers>>Python FastCGI in my web config but still it…
Rajat Nigam
  • 99
  • 2
  • 5
1
vote
0 answers

python flask website on windows HTTP Error 500 - Internal server error

I have set up a Python flask through IIS. I have set up IIS and wfastcgi. I have verified below - Install IIS and CGI Install wfastcgi Created webconfig file Configure IIS directories and permissions When i try to URL I am seeing below - HTTP…
goe
  • 337
  • 2
  • 14
1
vote
1 answer

How can a string (taken from a python wsgi environ) be different when iterating over its chars?

We have recently come across a situation where iterating over a string (e.g. list(some_string)) gives something completely different than printing some_string directly. How can this happen? Some background: We are running a python web application on…
cnschn
  • 61
  • 4
1
vote
1 answer

Random logouts with flask-login on IIS with FastCGI

I'm running a Dash/Flask app on Windows Server 2019 with IIS. I installed IIS with CGI, installed wfastcgi in the app's virtual environment, ran wfastcgi-enable as an administrator and specified the FastCGI application as a route handler in…
abirnkraut
  • 21
  • 2
1
vote
0 answers

Flask apscheduler not working correctly on IIS

I am having an issue getting my background task to fire off at the scheduled interval using a production webserver (IIS). My app works correctly with the built in Werkzeug web server, but when I deploy to IIS the background task does not fire every…
its30
  • 253
  • 3
  • 17
1
vote
1 answer

IIS Fastcgi only runs env's created by a certain user

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…
MatthiasTT
  • 39
  • 6
1
vote
1 answer

How to fix "AttributeError: module has no attribute 'wsgi' " in wfastcgi

I try to set up my django 2.2.2 project 'WebGUI' on IIS 10 (Windows Server 2019), but sadly I can't get it to work. WFastCGI is installed and enabled, I created a web.config and declared a python FastCGI handler in there. the keys should be correct…
Darais
  • 11
  • 1
  • 3
1
vote
0 answers

Flask IIS wfastcgi Logging from multiple modules

My Flask App has a structure like below - util/ -- util.py - module/ -- mod1.py -- mod2.py - restserver.py restserver.py has logging.config.dictConfig as per https://gist.github.com/jakubczaplicki/c9077a482c2b195b7f3bcbee19dde441 This app is hosted…
godimedia
  • 987
  • 2
  • 12
  • 28