Is there an easy way to log all exceptions in an ASP.NET application? I\'m already logging unhandled exceptions through the Application_OnError event, but I want to perform
ASP.NET Health Monitoring does this in an elegant and fairly automatic way (no need to manually catch exceptions):
When you click the first link, there is an example of how to enable and configure ASP.NET Health Monitoring. You need to configure it in web.config file.
For logging to a DB, you can create the corresponsing table using the ASP.NET SQL Server Registration Tool: ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe)
I really like it. For manual logging, patterns & practices Enterprise Library's Logging Application Block might be something for you, but this is slightly off-topic.
Matthias