Running python/flask app on IIS using ASP.Net Core Module handler

Blake Duffey 41 Reputation points
2024-03-22T18:23:02.2866667+00:00

Looking for insight into running/flask app using a modern/maintained method.

wfastcgi is essentially deprecated (version 3.0.0 was released 7 years ago).

HttpPlatform handler was replaced by the asp.net core module even before that (2016).

I’ve made some progress using the ASP.Net Core Module handler - but when I try to launch the app I get an error:

Application ‘/LM/W3SVC/1/ROOT’ with physical root 'C:\inetpub\wwwroot' failed to start process with commandline ‘“C:\Python312\python.exe” C:\inetpub\wwwroot\app.py’ with multiple retries. Failed to bind to port ‘11905’. First 30KB characters of captured stdout and stderr logs from multiple retries:

Nothing in the python log.

Internet Information Services
{count} votes

Accepted answer
  1. Lex Li (Microsoft) 4,662 Reputation points Microsoft Employee
    2024-03-23T06:32:03.4633333+00:00

    Your words indicate that you just read some badly written posts. Please read mine and see why HttpPlatformHandler should be used, https://docs.lextudio.com/blog/the-rough-history-of-iis-httpplatformhandler/ I also provided a Flask example.


0 additional answers

Sort by: Most helpful