views:

79

answers:

2

I am involved in designing a asp.net webforms application using .NET 3.5. I have a requirement where we need to log exceptions.

What is the best approach for exception handling, given that there would be concurrent users for this application?

Is there a need or possibility to log in exceptions at a user level? My support team in-charge wants to have a feature where the support team can get user specific log files.

To give you a background, this application is currently on VB 6.0 and we are migrating it along with some enhancements. So, today the support personnel have a provision to get user specific log files.

A: 

While this is a bit self promotion, CuttingEdge.Logging allows native support for logging the user name in who's context a log event occured. When you configure the AspNetSqlLoggingProvider with the userNameRetrievalType set to "Membership", it allows retrieving the user name from the System.Web.Security.Membership subsystem (in the current release you need a membership provider to be configured. The next version will simply get the user name from the HttpContext).

The AspNetSqlLoggingProvider logs to a database. The framework does not contain any tools for analyzing logs. When you want this, you can take a look at ELMAH, and I believe there are tools (both open source and commercially) available for log4net.

Good luck.

Steven
A: 

My vote is for ELMAH. It is the easiest to set up and automagically lets you find bugs that never get reported back from the end-user.

ggonsalv