I'm trying to deploy FastAPI app on IIS. I followed this guide from Microsoft.
My web.config looks like
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="PythonHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
</handlers>
<httpPlatform processPath="c:\Python\Python310\python.exe"
arguments="uvicorn main:app"
stdoutLogEnabled="true"
startupTimeLimit="60"
processesPerApplication="16">
<environmentVariables>
<environmentVariable name="TEMPLATE_STRING" value="some-random-string-text" />
</environmentVariables>
</httpPlatform>
</system.webServer>
</configuration>
When I'm trying to browse the application, I'm getting an error
HTTP Error 502.3 - Bad Gateway
There was a connection error while trying to route the request.
Most likely causes:
1. The CGI application did not return a valid set of HTTP errors.
2. A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.
Can someone point out to me in correct direction. It's my first time working with Windows Server (2019) and IIS (10).