IIS6.1
解決方法,修改web.config文件
1、在<system.webServer>配置節中<modules>添加
runAllManagedModulesForAllRequests="true"
<system.webServer> <modules runAllManagedModulesForAllRequests="true">//增加runAllManagedModulesForAllRequests="true" <remove name="FormsAuthentication" /> <remove name="ApplicationInsightsWebTracking" /> <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" /> </modules> <handlers> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <remove name="OPTIONSVerbHandler" /> <remove name="TRACEVerbHandler" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> </handlers> <validation validateIntegratedModeConfiguration="false" /> </system.webServer>
2、刪除<system.web>配置節中的<compilation targetFramework="4.5.2" />
<system.web> <authentication mode="None" /> <compilation targetFramework="4.5.2" /> //這一條刪除 <httpRuntime /> <httpModules> <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" /> </httpModules> <pages controlRenderingCompatibilityVersion="4.0" /> </system.web>