好的……我已经试着把这个页面发布一段时间了……
我的最新一期是:
错误部分在每个配置文件中只能出现一次。请参阅帮助主题
下面是web.config:
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<customErrors mode="Off"></customErrors>
<compilation />
<compilation targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" />
<httpModules>
<add name="ApplicationInsightsWebTracking"
type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule,
Microsoft.AI.Web" />
</httpModules>
</system.web>
<system.webServer>
<modules>
<remove name="FormsAuthentication" />
<remove name="ApplicationInsightsWebTracking" />
<add name="ApplicationInsightsWebTracking"
type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule,
Microsoft.AI.Web" preCondition="managedHandler" />
</modules>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
<validation validateIntegratedModeConfiguration="false" />
<directoryBrowse enabled="true" />
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>这个
是发布时自动添加erroring...These行的位置,然后出错。有什么想法吗?
我的最终目标是将服务器错误发布到浏览器,以便进行故障排除。
发布于 2017-11-27 10:57:33
<httpErrors errorMode="Custom" existingResponse="Replace">
<clear />
<remove statusCode="403" />
<remove statusCode="404" />
<remove statusCode="500" />
<error statusCode="403" path="/Error/Unauthorized" responseMode="ExecuteURL" />
<error statusCode="404" path="/Error/NotFound" responseMode="ExecuteURL" />
<error statusCode="500" path="/Error/Error" responseMode="ExecuteURL" />
</httpErrors>这是一个如何配置httpErrors的示例。
有关更多详细信息,请访问here
https://stackoverflow.com/questions/47497615
复制相似问题