zl程序教程

您现在的位置是:首页 >  工具

当前栏目

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

Chrome 访问 可以 出现 iis 正常 404 火狐
2023-09-11 14:14:21 时间

需要在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/