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!
This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2005/04/raleigh-code-camp-user-friendly-exception-handling-strategies.html
" 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
- dropping a .DLL in the /bin folder
- 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
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.