Topaz Filer: if you use e-mail for business, we can save you money and decrease your risk.
Global Exception Handling with ASP.NET
Details Related Types
Site:  http://webdeveloper.earthweb.com/
Original URL:  http://webdeveloper.earthweb.com/scripting/asp/article/0%2C%2C12225_961301%2C00.html
Summary:
You can't debug a problem if you don't know that it exists. After you take your web application live, you are no longer the only one who is using it (hopefully), so you need an effective plan to track exceptions when they occur while others are surfing your site. A great way to do this is to implement an exception handler at the application level. This will allow you to consolidate the logging and notification parts of your exception handling in one convenient place. As you'll see from the code examples that follow, your global exception handler can handle both specific exceptions that you trap in your code and generic unhandled exceptions.
System.Diagnostics.EventLog
System.Diagnostics.EventLogEntryType
System.DivideByZeroException
System.EventArgs
System.Exception
System.Web.HttpApplication
System.Web.HttpApplicationState
System.Web.HttpException
Ad
BootFX
Reliable and powerful .NET application framework.
Recession Busting Bespoke Software
Get through the recession by investing in bespoke software to decrease costs and create commercial opportunities.
Other DN247 Network Sites
.NET 247
SQL Server Wins
Old Skool Developer
 
Copyright © AMX Software Ltd 2008-2009. Portions copyright © Matthew Baxter-Reynolds 2001-2009. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - .NET 247 is a member of the DN247 Network - 4.0.30129.1734