I am trying to deploy Flask app in IIS.
But I get the 500 FastCGI error.
error code:"0x8007010b"
Here are the steps I've taken:
OS:windows10
Python version:3.6.5
1.install url rewrite2.0
2.pip install wfastcgi
3.Enable wfastcgi
4.create HelloAPI.py
5.create web.config
HelloAPI.py
from flask import Flask
app=Flask(__name__)
@app.route('/',methods=['GET'])
def index():
return "Hello Flask!"
if __name__=='__main__':
app.run(debug=True)
web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="FlaskFastCGI" path="*" verb="*" modules="FastCgiModule" scriptProcessor="d:\users\hhhung1\appdata\local\programs\python\python36-32\python.exe|d:\users\hhhung1\appdata\local\programs\python\python36-32\lib\site-packages\wfastcgi.py" resourceType="Unspecified" requireAccess="Script" />
</handlers>
<security>
<requestFiltering allowDoubleEscaping="true"></requestFiltering>
</security>
</system.webServer>
<appSettings>
<!-- Required settings -->
<add key="WSGI_HANDLER" value="HelloAPI.app" />
<add key="PYTHONPATH" value="~/" />
</appSettings>
</configuration>
Is there something I miss?
Problem solved. I grant the r/w right to python.exe folder and it works fine now.
You need to have read and execute permissions on the whole python folder that has python.exe for "IIS AppPool\DefaultAppPool"
User contributions licensed under CC BY-SA 3.0