How can I use FastAPI in IIS? #4207
-
Any way for FastAPI to work directly in IIS. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 31 replies
-
Really, are you a troll? |
Beta Was this translation helpful? Give feedback.
-
If we talk about the experience using IIS right now to deploy an Application is bad, and we see the developer experience is bad while using IIS, not like these new servers (Term of performance Linux servers are much better than Windows servers), but if want you could try to see if he support the ASGI Servers first and if uvicorn or starlette support the configuration of your IIS Server. I use it once in a Django Project I found this repo https://github.com/mjkillough/iis-asgi-handler that's helped me a lot to handle the ASGI Server. |
Beta Was this translation helpful? Give feedback.
-
Yes !, You can. |
Beta Was this translation helpful? Give feedback.
-
I found these two articles that Helped me (https://docs.microsoft.com/en-us/visualstudio/python/configure-web-apps-for-iis-windows?view=vs-2019) https://stackoverflow.com/questions/61919424/how-to-run-windows-iis-on-top-of-an-asgi-server-like-hypercorn-or-uvicorn (there may be a chance that 'httpPlatformHandler' may not be present in your system, then download and install it via 'Microsoft Web Platform Installer' available under Management Section on your IIS screen of respective Website. i have used hypercorn (alternative of unicorn suggested on the official fastapi website) web.config
(replace mentioned paths according to yours) may this will work for you too |
Beta Was this translation helpful? Give feedback.
-
Hello, I wrote a code with FastAPI, I am trying to publish it on IIS, but my FastCGI option does not appear on the server, otherwise I would be very happy if you could help me to publish it. |
Beta Was this translation helpful? Give feedback.
I found these two articles that Helped me
(https://docs.microsoft.com/en-us/visualstudio/python/configure-web-apps-for-iis-windows?view=vs-2019)
The first one recommending httpPlatformHandler in ISS for running Python Web Apps.
https://stackoverflow.com/questions/61919424/how-to-run-windows-iis-on-top-of-an-asgi-server-like-hypercorn-or-uvicorn
this second one shows how to use httpPlatformHandler for FastAPI specifically.
(there may be a chance that 'httpPlatformHandler' may not be present in your system, then download and install it via 'Microsoft Web Platform Installer' available under Management Section on your IIS screen of respective Website.
i have used hypercorn (alternative of uni…