问题背景

MVC5部署到IIS7中显示403错误。

 

解决方案

<system.webServer> → <modules> 节点下的 ApplicationInsightsWebTracking 修改为 UrlRoutingModule-4.0

<system.webServer>
    <modules>
        <remove name="ApplicationInsightsWebTracking" />
        <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
    </modules>
</system.webServer>

 修改为:

<system.webServer>
    <modules>
        <remove name="UrlRoutingModule-4.0" />
        <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
    </modules>
</system.webServer>

 

posted on 2018-09-26 23:45  FangMu  阅读(523)  评论(0编辑  收藏  举报