HttpModule Fundamentals

An HttpModule is a method of implementing and registering a class that can handle events generated by the HttpApplication class during the processing of a request. When an event is generated, the HttpModule can do additional processing on the request. HttpModules provide similar functionality to ISAPI filters, but are much easier to design and implement. Because an HttpModule is a global object, it is used to do things that affect most—if not all—of the .aspx files in your application. Here is a partial list of things that you can do with an HttpModule:

  • Authorize files and authenticate users.

  • Maintain a collection of objects to be used by a given user (similar to the Session object).

  • Add a message to the bottom of every ...

Get Special Edition Using® Microsoft® ASP.NET 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.