Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Health Monitoring or ELMAH what to choose?

net 4 in C# with SQL Server 2008 R2.

I need to choose an error logging solution for my Web Application.

I read some article ELMAH and ASP.NET Health Monitoring on the topic but I would like have your opinion and thoughts on which system you prefers in your a real world application and why.

Some point in which I'm interested:

- setup and configuration
- error reports
- performance
like image 821
GibboK Avatar asked Oct 12 '11 18:10

GibboK


3 Answers

ASP.NET Health Monitoring is not a logging solution. According to ASP.NET Health Monitoring overview:

ASP.NET health monitoring enables you to do the following tasks:

  • Monitor the performance of an application to make sure that it is healthy.
  • Rapidly diagnose applications or systems that are failing.
  • Appraise significant events during the life cycle of an application.
  • Monitor live ASP.NET applications, individually or across a Web farm.
  • Log events that do not necessarily relate to errors in an ASP.NET application.

The level of required configuration depends on what you need to accomplish. For several of my applications, all we need is:

<healthMonitoring enabled="true">
  <rules>
    <add name="Application Lifetime Events On" eventName="Application Lifetime Events" 
         provider="EventLogProvider" profile="Default"/>
  </rules>
</healthMonitoring>

This enables health monitoring and adds application lifetime events to those events collected by default. This way, we know when an application starts and stops, and why.

Note that we didn't have to touch any code to get this functionality.

like image 168
John Saunders Avatar answered Sep 19 '22 07:09

John Saunders


I found set up and integration with ELMAH very very easy to do. If you use NuGet to install ELMAH, It would be a piece of cake like Scott Hanselman shows in this video.

You just need to do following on your package manager and thats it:-

install-package elmah

like image 42
Ashish Gupta Avatar answered Sep 22 '22 07:09

Ashish Gupta


It's a matter of opinion (and requirements), but I'd choose ELMAH because it offers everything MS Health Monitoring offers, and then some. The biggest feature for me is the built in error viewer from ELMAH.

like image 23
Esteban Araya Avatar answered Sep 20 '22 07:09

Esteban Araya