What is Error Logging Modules and Handlers?
Error Logging Modules and Handlers (ELMAH) was introduced by Atif Aziz in 2004 for ASP.net 1.0. ELMAH is an component library that makes it easy for developers to instrument their applications with excellent error handling capabilities. By simply adding the dll to your bin directory and adding the necessary elements to your web.config, you can have ELMAH up and running in no time, with no additional changes to your code. My favorite feature is the fantastic email you get when an error occurs, complete with all server variables and an attachment with what the original page looked like in it's error state! Atif's site is here, and the original code project on GotDotNet is here.
This upgrade makes ELMAH fully compliant with the ASP.net 2.0 runtime. Of course the original code will still work, but this upgrade will compile on the 2.0 runtime without any warnings, and the reliance on CDONTS for mailing errors has been removed and replaced with System.Net.Mail objects.
How does ELMAH work?
ELMAH wires itself to the application's OnError event and uses HttpModules to send error messages to your designated destinations such as email or database. It also uses an HttpHandler so that you may view the messages online at your website. To read more about HttpModules and HttpHandlers, see here.
Why Should I Use ELMAH?
ELMAH is by far the easiest logging solution I have found. It's much easier to understand and configure than log4net, and it doesn't require any changes to your code base. All you do is configure ELMAH, it's that simple.
Enjoy!
:D