本地测试正常但是上传到空间到 500 错误这种事。。可参照如下配置,,Bug 修复后将 Detailed 改为 Custom ,前者意为“详细”,后者意为“自定义”。另外直接在虚拟主机控制面板自定义的 404 页面状态码可能不是 404.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="404.htm" responseMode="File" />
<asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
</configuration>
相关文章:
--【备忘】web.config 配置 IIS 显示详细错误信息–