We are working on exception handling with ASP.NET web applications (with C# language). Would you please let me know the best practices of Exception handling?
3 Answers
One thing you might want to look at is ELMAH. Other than that the MSDN docs is a good place to start.
1 Comment
Greg
Yes, Elmah + a custom errors page (
<customErrors mode="RemoteOnly" defaultRedirect="AppErrors.aspx">) + don't have empty catch blocks.You can use the Application_Error function in Global.asax to catch and handle all exception errors in your ASP.NET application.
Check this Microsoft Help article http://support.microsoft.com/kb/306355 and scroll to where it says "How to use the Application_Error method".