Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are managed modules?

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?

like image 251
Preston Avatar asked Dec 05 '12 22:12

Preston


1 Answers

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.

IIS listing of modules

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.

like image 57
McGarnagle Avatar answered Sep 28 '22 07:09

McGarnagle