Deploy flask api on IIS server gives error 0x8007010b notification: ExecuteRequestHandler

0

I have to deploy flask app on IIS server. configured the handler settings and also configured the fastcgi module settings for IIS server as given in the following tutorial https://medium.com/@rajesh.r6r/deploying-a-python-flask-rest-api-on-iis-d8d9ebf886e9 and https://medium.com/@bilalbayasut/deploying-python-web-app-flask-in-windows-server-iis-using-fastcgi-6c1873ae0ad8 I configured all the settings except url rewrite settings. I don't know how to configure it. When I run the flask app through python IDLE it runs fine and app url is accessible through browser. But IIS gives the following errors

    Module     FastCgiModule
    Notification       ExecuteRequestHandler
    Handler    pythonHandler
    Error Code     0x8007010b

I tried changing feature permissions but it gives error notifications like MapRequestHandler and ExecuteRequestHandler error codes:

    0x80070005, 0x80070002, 0x8007010b. 

Something from the trace log is as follows:

   <failedRequest url="http://localhost:5000/"
           siteId="5"
           appPoolId="tes_flask"
           processId="20452"
           verb="GET"
           remoteUserName=""
           userName=""
           tokenUserName="NT AUTHORITY\IUSR"
           authenticationType="anonymous"
           activityId="{80000887-0001-F800-B63F-84710C7967BB}"
           failureReason="STATUS_CODE"
           statusCode="500"
           triggerStatusCode="500"
           timeTaken="0"
           xmlns:freb="http://schemas.microsoft.com/win/2006/06/iis/freb"
           > 
python
flask
iis
fastcgi
flask-restful
asked on Stack Overflow Nov 26, 2020 by CSharpRocky • edited Nov 26, 2020 by CSharpRocky

2 Answers

0

I think this is probably a permission issue. Because 0x8007010b means The directory name is invalid.

  1. Ensure that the identity of the application pool has administrator rights. You can create a user with administrator rights or directly set it as a local system.
  2. Ensure that the application and FastCgiModule directories have read and write permissions.
answered on Stack Overflow Nov 26, 2020 by Bruce Zhang
0

In order to solve this issue I had to grant Modify and Write permissions to the python.exe for the IUSR user.

answered on Stack Overflow Dec 4, 2020 by Andrea

User contributions licensed under CC BY-SA 3.0