I have configured URL routing in IIS. When runAllManagedModulesForAllRequests set to true, URL routing works.
Using the following web.config (and runAllManagedModuesForAllRequests set to false) I get 404:
<system.web> <compilation defaultLanguage="c#" debug="true" targetFramework="4.5"> <assemblies> <add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </assemblies> </compilation> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <handlers> <remove name="UrlRoutingHandler" /> <add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </handlers> <modules> <remove name="UrlRoutingModule" /> <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </modules> </system.webServer>
How to configure URL routing only for specific requests?
I tested this configuration in IIS 7.5 and IIS 8. This is a web form application. All URLs show 404 behavior.
source share