Chapter 26. Modules and Handlers
Sometimes, just creating dynamic Web pages with the latest languages and databases does not give you, the developer, enough control over an application. At times, you need to be able to dig deeper and create applications that can interact with the Web server itself. You want to be able to interact with the low-level processes, such as how the Web server processes incoming and outgoing HTTP requests.
Before ASP.NET, in order to get this level of control using IIS, you were forced to create ISAPI extensions or filters. This proved to be quite a daunting and painful task for many developers because creating ISAPI extensions and filters required knowledge of C/C++ and knowledge of how to create native Win32 DLLs. Thankfully, in the .NET world, creating these types of low-level applications is really no more difficult than most other tasks you would normally perform. This chapter looks at two methods of manipulating how ASP.NET processes HTTP requests, the HttpModule and the HttpHandler. Each method provides a unique level of access to the underlying processing of ASP.NET and can be powerful tools for creating web applications.
Processing HTTP Requests
Before starting to write Handlers or Modules, it's helpful to know how the ASP.NET normally processes incoming HTTP requests and what options you have for plugging into those requests. ASP.NET processes HTTP requests using a pipeline model. This model has two core mechanisms for processing HTTP requests: HttpModules ...
Get Professional ASP.NET 2.0 Special Edition 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.