Generic HTTP Module
About Todd Matson Client Resources Consulting Services Areas of Expertise Course Materials Portfolio Contact Information
Generic HTTP Module

One underused feature of ASP.NET is the ability to intercept and redirect HTTP requests. Requests can be sent to handlers which generate dynamic content in real time. It is all done with a construct called the HTTP Module.

I've created a generic HTTP Module which uses static functions to manage HTTP handlers. The result is a clean approach to dynamic content.

Generic HTTP Module

Demo

The Text Renderer is one example of dynamic content made possible by the Generic HTTP Module.

For a simpler example, consider the image on the left. If you look at the source for this page, you'll see that the URL for that image is "fern.png". However, no such file exists on the server. I've used the Generic HTTP Module to redirect all requests for "fern.png" to a handler which draws a fractal fern in real time.


Technical Notes
  • The Generic HTTP Module was written in C#.NET.
  • The TextRenderer class implements System.Web.IHttpModule.

Availability

I wrote the Generic HTTP Module for my own use, but I'd be glad to share it with other web developers. If you want a copy, send me a note at tmatson@MatsonConsulting.com.