About Me

Training

Nothin But .Net Developer Bootcamp

Navigation

Search

Categories

On this page

The often forgotten, but extremely powerful IHttpModule and IHttpHandler interfaces

Archive

Blogroll

 Agile Developer Venkat's Blog
 Ayende @ Blog
 B#
 Barry Gervin's Software Architecture Perspectives
 Boy Meets World
 Brad Abrams
 Canadian Developers
 Christopher Steen
 Claritude Software News
 Clemens Vasters: Enterprise Development and Alien Abductions
 Coding Horror
 Coding in an Igloo
 Dare Obasanjo aka Carnage4Life
 Darrell Norton's Blog [MVP]
 David Hayden [MVP C#]
 Don Box's Spoutlet
 Eric Gunnerson's C# Compendium
 EZWeb guy: Jeffrey Palermo [C# MVP]
 Fear and Loathing
 Generalities & Details: Adventures in the High-tech Underbelly
 Greg Young [MVP]
 Greg's Cool [Insert Clever Name] of the Day
 IanG on Tap
 Ingo Rammer's Weblog
 ISerializable - Roy Osherove's Blog
 James Kovacs' Weblog
 Jason Haley
 Jean-Luc David
 Jeremy D. Miller -- The Shade Tree Developer
 JetBrains .NET Tools Blog
 Jimmy Nilsson's weblog
 John Bristowe's Weblog
 John Papa [MVP C#]
 Jon Skeet's Coding Blog
 JonGalloway.ToString()
 Jump the Fence or Walk Around
 Lambda the Ultimate - Programming Languages Weblog
 Larkware News
 Lutz Roeder
 Marquee de Sells: Chris's insight outlet
 Martin Fowler's Bliki
 Mike Nichols - SonOfNun Technology
 MSDN Magazine - .NET Matters
 MSDN Magazine - All Articles
 OdeToCode Blogs
 Onion Blog
 Planet TW
 Raymond Lewallen [MVP]
 Rockford Lhotka
 RodMan's Corner
 Roger Johansson's blog
 Sahil Malik - blah.winsmarts.com
 Sam Gentile's Blog
 Scott Bellware [MVP]
 Scott Hanselman's Computer Zen
 ScottGu's Blog
 secretGeek
 Service Station, by Aaron Skonnard
 Signum sine tinnitu--by Guy Kawasaki
 Stephen Toub
 Steve Eichert's Blog
 Steven Rockarts
 The Blog Ride
 The Coding Hillbilly
 The Daily WTF
 TheServerSide.net: News
 Tim Gifford
 Vance Morrison's Weblog
 you've been HAACKED

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 477
This Year: 47
This Month: 2
This Week: 4
Comments: 1344

 Wednesday, June 07, 2006
Wednesday, June 07, 2006 3:36:14 PM (Mountain Standard Time, UTC-07:00) ( .Net 2.0 | C Sharp )

As cool as some of the new features in ASP.Net are, there are some simple interfaces that can open a door to a boatload of functionality for your web applications. I am talking specifically about the IHttpModule and IHttpHandler interfaces. Lots of developers are aware of the interesting problems that you can solve (cleanly) by taking advantage of these interfaces. Lots, however, are still in the mindset that to add new pieces of functionality that an .aspx / .ascx file has to be involved in the picture somewhere. This is just not the case. I am not going to rehash information that is already out there for consumption. Instead I will direct you to the site of James Kovacs, who has just published a great writeup on using an IHttpModule implementation for dealing with Site Availability issues.

If you are not familiar with these interfaces, read the article (along with his article on the ImpostorHttpModule), and start thinking of ways you can use these interfaces in your application. Some examples that I have used in the past are:

  • IHttpHandler implementation that watermarks all images in the application with a company logo
  • IHttpHandler implementation for doing 2 step transform/view implementation without the need for an aspx page
  • Pre 2.0, IHttpHandler for securing non asp.net releated web resources
  • IHttpModule implementation for creating strongly typed payload objects and attaching them to the executing request
  • IHttpModule implementation for custom authorization
  • IHttpHandler implementation for retrieving images from a database

Just think of the things you could do!!

kick it on dotnetkicks.com