Thursday, November 21, 2013

Adding Top-Level Exception Handling to a C# Web Application? : csharp

OP - Elmah is excatly what you need. You drop it into a project and within minutees you have a website that captures error automatically.
By default it stores them in memory, but you can easily store the errors in a database(you just supply a connection string). You can set it up to email or tweet you if an error occurs. That's just as easily set up. I had a few large sites with elmah configured to email me and it worked flawlessly.
Elmah-R is a great way to connect multiple websites to a single elmah site https://bitbucket.org/wasp/elmahr/wiki/Home
The downside to elmah is that it's old and no active development has happened in a few years. A product I really like is Raygun it's not free, but you get a great error reporting mechanism that requires little to no setup. You literally drop two lines of code into your web application.