I've recently been pushing some ASP.NET MVC 3 and 4 sites to IIS 7 and have had major issues. Usually the fix is to include the following to the Web.Config
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
My question is, why? What is a Managed Module and how do they work with ASP.NET MVC/C#?
EDIT: After further testing I have discovered that this issue does not exist on Server 2008 R2 and IIS 7.5 but the question still stands, what is a managed module and how would I know if I'm using one in my code?
A module is an ASP.Net component that plugs in to some point of the request pipeline; there are many "official" modules, although you can also code your own.
As you can see, modules perform a variety of functions including output caching, various kinds of authorization and authentication, and much more.
It's best not to run all managed modules; instead, if you can, figure out what modules a given application or platform needs. For ASP.Net MVC, that is likely the routing module: System.Web.Routing.UrlRoutingModule
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With