In a
previous post, I wrote about URL Routing and how it affects Session State. I also mentioned about removing the preCondition=”managedHandler” attribute. While upgrading some of my older website projects from 3rd Party URL Re-Writing mechanism to URL Routing, I noticed that Session State works without doing the managedHandler. I was curious why so I did some digging and noticed this in the system.webServer Modules section of my Web.config file:
<system.webserver>
<modules runallmanagedmodulesforallrequests="true">
Notice the attribute runAllManagedModulesForAllRequests="true". This is another solution to getting around the preCondition since as the attribute infers, it runs all managed modules for all requests! This was previously done with the URL-Rewriting information given in
Scott Guthrie's blog.
Now does this really all requests? I wish I knew!