django - Django - IIS 部署 - 找不到 scriptProcessor
问题描述
我一直在尝试使用 IIS 部署 django 应用程序,但是在执行了所有步骤之后,我遇到了错误
<handler> scriptProcessor could not be found in <fastCGI> application configuration
我知道这个错误是由于 scriptprocessor 值的路径不正确,但提到的值是正确的。请看下面的截图
wfastcgi-enable 的截图
Applied configuration changes to section "system.webServer/fastCgi" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
""c:\program files\python39\python.exe"|"c:\program files\python39\lib\site-packages\wfastcgi.py"" can now be used as a FastCGI script processor
以下是 wwwroot 文件夹中 web.config 文件中设置的值
<handlers>
<add name="Python FastCGI"
path="*"
verb="*"
modules="FastCgiModule"
scriptProcessor="c:\program files\python39\python.exe|c:\program files\python39\lib\site-packages\wfastcgi.py"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
有人可以帮助我为什么面临这个错误。
解决方案
终于解决了问题!
问题在于scriptProcessor键的值。scriptProcessor 的路径有空间,这就是抛出的问题错误。
我终于不得不重新安装python,路径之间没有空格,如下所示,它工作正常。
scriptProcessor="c:\python39\python.exe|c:\python39\lib\site-
packages\wfastcgi.py"
推荐阅读
- google-smart-home - 目标设备的错误和阻塞异常有什么区别?
- python - Django:对模型上的方法的给定结果进行排序
- angular - mat-icon 不是角度中的已知元素
- jenkins - 使用 groovy 为自由式和管道作业打印 Git SCM 详细信息
- javascript - 如果后面的断言失败,如何重试第一个 cypress 命令
- splunk - 获取错误为“正则表达式:子模式名称中的语法错误(缺少终止符)。” 在 SPLUNK 中
- c - 我的 C 程序的“for”循环在 3 次迭代后停止
- azure-devops - 如何使用 Azure DevOps Server Rest APi 授予权限
- java - Spring Boot Rest API 返回与 Lombok 一起使用的空 JSON
- typescript - 打字稿路径未解析