.net webconfig中配置httphanlder无法生效的问题

<system.web>
<compilation debug="true" targetFramework="4.6.1"/>
<httpRuntime targetFramework="4.6.1"/>
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
</httpModules>
<httpHandlers>
<add path="comet_broadcast.asyn" type="AsnyHandler" verb="POST,GET"/>
</httpHandlers>
</system.web>

这是iis7.0(集成模式)中httphandlers的配置方法,因为我的是iis6.0所以配置文件扩展名.asyn的时候一直报404错误,后来发现iis6.0是经典模式应该在

<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ApplicationInsightsWebTracking"/>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
preCondition="managedHandler"/>
</modules>
<handlers>
<add name="comet_broadcast" path="comet_broadcast.asyn" type="AsnyHandler" verb="POST,GET"/>
</handlers>
</system.webServer>中进行配置handlers而不是配置httphandlers。

详见:http://www.mamicode.com/info-detail-1848530.html

原文地址:https://www.cnblogs.com/javazyh/p/9548133.html