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.
Posted by Jeff Atwood
" 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
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.
Thanks for the clarification.It was helpfull
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 ??
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.