Name

IHttpModule

Synopsis

You can use this interface to create custom HttpModules. HttpModules are added through the <httpmodules> section of the web.config file. Some HttpModules that are available to you include FormsAuthenticationModule, PassportAuthenticationModule, and other security modules in the System.Web.Security namespace.

HttpModules are often used for security or logging because they can participate in the processing of every request into an application. HttpModules work by reacting to ASP.NET events. For example, if you want an HttpModule to participate in every web request, you could react to the HttpApplication.BeginRequest event. You can also specify that a HttpModule process other files (for example, JPEG and BMP) rather than just ASP.NET file types by updating the Application Extension Mapping to use aspnet_ISAPI.dll to manage the appropriate extension.

Public Interface IHttpModule
                  ' Public Instance Methods
   Public Sub Dispose() 
   Public Sub Init(ByVal context As HttpApplication) 
End Interface

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.