Python wfastcgi在Win7上的IIS中找不到flask应用程序
我正在尝试为Windows 7在IIS6上设置wfastcgi,但它找不到我的“app.py”文件。我用它来指导我的设置。下面是我收到的错误消息。在我寻找答案的过程中,最有可能的解决方案是权限问题,我相信我给出的权限是正确的,但仍然没有运气Python wfastcgi在Win7上的IIS中找不到flask应用程序,python,iis,flask,iis-6,wfastcgi,Python,Iis,Flask,Iis 6,Wfastcgi,我正在尝试为Windows 7在IIS6上设置wfastcgi,但它找不到我的“app.py”文件。我用它来指导我的设置。下面是我收到的错误消息。在我寻找答案的过程中,最有可能的解决方案是权限问题,我相信我给出的权限是正确的,但仍然没有运气 Error occurred while reading WSGI handler: Traceback (most recent call last): File "C:\inetpub\wwwroot\Flask_Proj\wfastcgi.py", l
Error occurred while reading WSGI handler:
Traceback (most recent call last):
File "C:\inetpub\wwwroot\Flask_Proj\wfastcgi.py", line 712, in main env, handler = read_wsgi_handler(response.physical_path)
File "C:\inetpub\wwwroot\Flask_Proj\wfastcgi.py", line 569, in read_wsgi_handler return env, get_wsgi_handler(handler_name)
File "C:\inetpub\wwwroot\Flask_Proj\wfastcgi.py", line 552, in get_wsgi_handler raise ValueError('"%s" could not be imported' % handler_name)
ValueError: app.app could not be imported StdOut: StdErr:
这是Web.config
文件
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="WSGI_HANDLER" value="app.app" />
<add key="PYTHONPATH" value="C:\inetpub\wwwroot\Flask_Proj\" />
</appSettings>
<system.webServer>
<handlers accessPolicy="Read, Script">
<add name="FlaskHandler" path="*" verb="*" modules="FastCgiModule" scriptProcessor="C:\Python34\python.exe|C:\inetpub\wwwroot\Flask_Proj\wfastcgi.py" resourceType="Unspecified" requireAccess="Script" />
</handlers>
</system.webServer>
</configuration>
以下是我发现的一些类似问题的链接:
https://www.experts-exchange.com/questions/28937664/Installing-Flask-app-on-IIS7.html
https://social.msdn.microsoft.com/Forums/en-US/3113de0a-3385-48dc-872b-d70deac071c6/azure-flask-python-could-not-be-imported-error-500-azure-website?forum=windowsazurewebsitespreview
我发现我做错了什么。这是一个愚蠢的错误,但根据我的搜索结果,我可能不是唯一一个。我安装了python,但我没有安装Flask。一旦我明白了,其他的一切都很容易弄清楚
https://www.experts-exchange.com/questions/28937664/Installing-Flask-app-on-IIS7.html
https://social.msdn.microsoft.com/Forums/en-US/3113de0a-3385-48dc-872b-d70deac071c6/azure-flask-python-could-not-be-imported-error-500-azure-website?forum=windowsazurewebsitespreview