runAllManagedModulesForAllRequests=”true”

runAllManagedModulesForAllRequests=”true” was something I added to all my web.config files for ASP.NET MVC when I wanted to run the web app in deployment on my Windows Server 2008 box.

I wanted to have Glimpse configured for the project though, and as this needed the ability to add (another) module in web.config, I decided to figure out why runAllManagedModulesForAllRequests was needed in the first place, understand a bit more about it, and then hopefully fix it properly as it always seemed a bit of a hack.

Thankfully there is some good advice here:

Don’t use runAllManagedModulesForAllRequests=”true” when getting your MVC routing to work

And a hotfix from Microsoft so you do not need to do any hacking with web.config:

http://support.microsoft.com/kb/980368

Edit 21/8/2013

Turns out applying the above fix might cause some issues if you then have a . in a url slug, eg /blog/guide-to-hotels-at-hotels.com

The .com part causes an issue.

The below link to a stackoverflow answer shows how to add a httphandler that solves this problem…

http://stackoverflow.com/a/12151501/5463

This entry was posted in asp.net mvc. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *