火狐访问IIS出现404,而Chrome可以正常访问

需要在web.config中的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" />

 

https://stackoverflow.com/questions/9703090/http-404-page-not-found-in-web-api-hosted-in-iis-7-5

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

 

http://blog.deltacode.be/2017/01/04/why-remove-and-add-extensionlessurlhandler/

posted @ 2017-11-08 14:12  ChuckLu  阅读(774)  评论(0编辑  收藏  举报