Contents tagged with Modules
Modules are a great extensibility mechanism because they allow us to glimpse into a request and to do something before the response is sent back.
Next in the series is modules. So, what is a module, and what does it do?
As you may already know, ASP.NET 4.0 brought along with it a new mechanism to execute methods before the application start event (the Application_Start method): the PreApplicationStartMethodAttribute. This attribute, when applied to an assembly, indicates a method which is to be run before the application starts. If your web application references any assembly which has this attribute, it will run the method it declares, throwing an exception it if is not found.