0

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.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Srikanth Venugopalan
  • 9,011
  • 3
  • 36
  • 76
  • Possible duplicate: http://stackoverflow.com/questions/2107220, http://stackoverflow.com/questions/284868, http://stackoverflow.com/questions/355282 – Jens Granlund May 12 '10 at 09:01
  • 2
    Here's a list of .NET logging frameworks: http://stackoverflow.com/questions/2802833/implementing-a-logging-library-in-net-with-a-database-as-the-storage-medium/2803802#2803802. – Steven May 12 '10 at 09:03

2 Answers2

0

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 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
  • 166,672
  • 24
  • 332
  • 435
0

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
  • 1,264
  • 8
  • 18