I have a site running ASP.NET 2 / IIS7 / Vista. I have a URL rewrite module that allows me to have URLs without extension. To make this work, I configured the system.webServer section of the configuration file so that all requests are forwarded to aspnet_isapi.dll. I also added a URL rewrite module to the modules section and set runAllManagedModulesForAllRequests to true.
When I launch a website and visit one of the pages using URL rewriting, the page displays correctly. However, if I then go to another page, the site will stop working, and I will not find 404. I also found that my breakpoint in the URL rewrite module did not hit. It is almost the same as if IIS redirects the first request to the rewriting device, but the subsequent ones are sent to another place - on the error page the notification is mentioned as MapRequestHandler and the handler as StaticFile.
If I then make a small change to the web.config file and save it, triggering a reload of the website, I can reload the page in the browser and it will all work. Then I click another link and it breaks again.
To write here, a couple of fragments from the configuration file. Firstly, in system.web:
<httpModules> <add name="UrlRewriteModule" type="Arcs.CoopFurniture.TelesalesWeb.UrlRewriteModule, Arcs.CoopFurniture.TelesalesWeb" /> </httpModules>
and then in system.webServer:
<system.webServer> <modules runAllManagedModulesForAllRequests="true"> <add name="UrlRewriteModule" type="Arcs.CoopFurniture.TelesalesWeb.UrlRewriteModule, Arcs.CoopFurniture.TelesalesWeb" preCondition="managedHandler" /> </modules> <handlers> <add name="AspNet" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness32" /> </handlers> <validation validateIntegratedModeConfiguration="false" /> </system.web>
The site operates in a classic, rather than an integrated pipeline mode.
Does anyone have any ideas? I suspect that my configuration is somewhere wrong, but I cannot find where.