You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting permission Error [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions when running FastAPI in IIS
#231
Open
jstoppa opened this issue
May 15, 2024
· 0 comments
I also tried to grant IIS_IUSRS access to python.exe but it didn't make any difference, it was suggested in this post as when calling the API it hangs forever
I suspect it's something to do with the IIS port binding, if I change the web.config to point at another port (e.g. 8080) different than the binding port in IIS then I'm able to access the API (e.g. by navigating to http://localhost:8080), it feels to me IIS is using the port when hypercorn is trying to use it
The text was updated successfully, but these errors were encountered:
jstoppa
changed the title
Getting permission Error [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions when running in with FastAPI
Getting permission Error [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions when running FastAPI in IIS
May 15, 2024
I have an issue that appears to be related to hypercorn as this does not happen with uvicorn
I'm trying to setup FastAPI in IIS using hypercorn and I keep getting the error
My web.config is the following
If I stop IIS and I run the command below it works fine, it's only when running it inside IIS.
I also tried to grant IIS_IUSRS access to python.exe but it didn't make any difference, it was suggested in this post as when calling the API it hangs forever
I suspect it's something to do with the IIS port binding, if I change the web.config to point at another port (e.g. 8080) different than the binding port in IIS then I'm able to access the API (e.g. by navigating to http://localhost:8080), it feels to me IIS is using the port when hypercorn is trying to use it
More info in here, my current workaround is to use uvicorn https://stackoverflow.com/questions/78471188/fastapi-running-in-iis-getting-permissionerrorwinerror-10013-an-attempt-was?noredirect=1#comment138365253_78471188
The text was updated successfully, but these errors were encountered: