Raleigh Code Camp: User Friendly Exception Handling Strategies

April 9, 2005

I had a great time at today's Raleigh MSDN Code Camp. There's nothing better than geeking out with a bunch of guys (and gals) who are as passionate about this stuff as you are!

For anyone who couldn't attend, here's a a local copy of my presentation, User Friendly Exception Handling Strategies (3mb zip). This includes the Powerpoint presentation plus the three VS.NET 2003 demo solutions.

User Friendly Exception Handling Strategies title slide

Posted by Jeff Atwood
6 Comments

You mentioned

" However, avoid Global.asax and Application_Error in favor of the HttpModule approach

It’s much more flexible"

Can you mention why ? (any special benifits etc) I was using the Global.asax in the current web application I'm working on.There are a number of articles
like
http://www.15seconds.com/issue/030102.htm
for example.

Thanks
a.m

Abraham Mathew on April 11, 2005 8:58 AM

They are functionally the same, however, the HttpModule can be implemented without recompilation. This means I could take your ASP.NET website, without any access to the source code, and add a complete Unhandled Exception Handling strategy by simply

1) dropping a .DLL in the /bin folder
2) making a small edit to your Web.config

That's what I mean by "more flexible". It lets you turn your error handling into a pluggable module for all your future websites.

Jeff Atwood on April 11, 2005 11:34 AM

Thanks for the clarification.It was helpfull
a.m

Abraham Mathew on April 12, 2005 4:00 AM

1) dropping a .DLL in the /bin folder does that mean I have to recompile the project again ?? Like If I had the UnhandledHttpModule.vb + edit web config means I have to compile the project again ? and then drop the assembly into the bin ??

Abraham Mathew on April 12, 2005 4:06 AM

I have to compile the project again

No, you don't have to recompile anything when using the IHttpModule approach. That's why it's so powerful.

However, when you modify web.config your ASP.NET application will restart-- that's it.

Jeff Atwood on April 12, 2005 11:43 AM

thanks for the info

Abraham Mathew on April 13, 2005 2:44 AM

The comments to this entry are closed.