MVC5 IIS7 403錯誤

問題背景

MVC5部署到IIS7中顯示403錯誤。html

 

解決方案

<system.webServer> → <modules> 節點下的 ApplicationInsightsWebTracking 修改成 UrlRoutingModule-4.0web

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

 修改成:app

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

 

相關文章
相關標籤/搜索