Injection Point #1 - HTTP Modules
HTTPModules are classes that examine
and modify HTTP Requests as they come through. When you register a new one for
your application you can get it to do stuff. For example, you can use set
event handlers for it's events like BeginRequest and EndRequest
to take a look a system resources before and after the request has passed or
measure the time it takes to process a request.
Also, because you get passed an
HTTPApplication object, you can look at and modify objects that you are
already used to like the Response and Request objects.
See the Related Articles for more
information on HTTPModules.
Injection Point #2 - HTTP Handlers
Not all request are processed by all of the
HTTPHandlers that you have defined. Usually you define a new extention
in IIS that gets passed to the ASP.NET ISAPI Filter and then handle that
specific extension in your handler or you can use existing ones.
You get passed in an HTTPContext
object and then can use that to modify the request and response. HTTP Handlers
can also be deployed as files with the .ASHX extension which makes them easier
to deploy.
The uses of an HTTPHandler may include
checking the client browser to determine if they can support something and
then terminating the request if needed. This is easier than coding this into
the aspx file because this way it just takes one line of code in web.config.
See the Related Articles for more
information on HTTPHandlers.