ASP.NET HttpHandlers and HttpModules
Blog Date: 5/5/2009
Right now I'm reading about custom HttpHandlers. You may be familiar with them from the ASP.NET world. These are a way for the server to understand the functionality of extensions. There's a great article at 15 seconds for it:
http://www.15seconds.com/Issue/020417.htm
Summary of Http Handlers and Http Modules in ASP.NET
ISAPI is an important technology that allows us to enhance the capabilities of an ISAPI-compliant Web server (IIS is an ISAPI-compliant Web server). The following components serve this purpose:
- ISAPI Extensions
- ISAPI Filters
ISAPI extensions are implemented by using Win32 DLLs. You can think of an ISAPI extension as a normal application. ISAPI extensions are the target of http requests. That means you must call them to activate them. For example, the following URL calls the store.dll ISAPI extension and passes two values to it:
http://www.myownwebsite.com/Store.dll?sitename=15seconds&location=USA
Think of an ISAPI filter as just that: a filter. It sits between your Web server and the client. Every time a client makes a request to the server, it passes through the filter.
Clients do not specifically target the filter in their requests, rather, clients simply send requests to the Web server, and then the Web server passes that request to the interested filters.
Filters can then modify the request, perform some logging operations, etc.
It was very difficult to implement these components because of the complexities involved. One had to use C/C++ to develop these components, and for many, development in C/C++ is a pain.
So what does ASP.NET offer to harness this functionality? ASP.NET offers HttpHandlers and HttpModules.
I'll finish more on this later for my custom implementation...
5/5/2009 8:41:20 PM
|