IIS 7.5 – a breaking change in extensionless URIs handling after Windows Server 2008 R2 SP1 is applied?

别来无恙 提交于 2019-12-11 00:57:05

问题


We are experiencing a problem with an application we recently migrated from IIS 6 .net 2.0 to IIS 7.5 .net 4.0 (ASP.Net Web Forms)

The code performs custom rewriting in the global.asax Application_BeginRequest event and uses the HttpContext.Current.RewritePath() method to do the re-writing.

When a bad request (a page which does not exist) with an extension comes in like /kentest/test.blah things are handled properly - IIS properly passes in the custom error page which we re-direct to.

When a bad request comes in without a file extension like /kentest/test then IIS does not properly pass the custom error page. We get caught in a loop rewriting the same /kentest/test over and over until IIS throws a recursion 500 exception.

Any ideas how to solve this and get requests without extensions working?

Others seem to have encountered this issue as this blog post mentions but no solution is provided.

Update We Solved This Issue

We needed to add the following to the web.config in the handlers section:

<remove name="ExtensionlessUrlHandler-Integrated-4.0" />

回答1:


We needed to add the following to the web.config in the handlers section:

<remove name="ExtensionlessUrlHandler-Integrated-4.0" />


来源:https://stackoverflow.com/questions/11633611/iis-7-5-a-breaking-change-in-extensionless-uris-handling-after-windows-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!