views:

85

answers:

5

What is the best way to monitor (Health and Performances) a .NET Application ?

A: 

event log? SQL Server audit table?

two great logging libraries are ELMAH and log4net

David
+3  A: 

Windows has the usual performance counters and .NET add some (GC cycles, JIT time, etc). Have a look at Peformance Monitor.

Timores
A: 

I tried redgate Ants. Those are pretty capable profilers for .NET.

http://www.red-gate.com/

gilbertc
Ants is for developpment time, i need a solution to monitor when applications are in production.
Yoann. B
A: 

I suggest to use JetBrains dotTrace, very power tool, though it's not free :(

Alexander
+1  A: 

First off You have perfomance counters. They are windows based objects that are used to gather variuos data. There are a lot of built in ones (for .NET ASP general windows applications). You can monitor the memory size, number of frames I/O operations, threads, handles, almost everything. The good thing about perf Counters is that You can define Your own. So for example if You want to. A sample article can be found here. As some people said before me it's worthwile to set up some logging infrastructure, but I presume You know that. Log4Net is awesome and easily extensible so have a look, and enterprise library also has a not bad logging application block. It's worth using IoC (inversion of control pattern) to set up logging infrastructure, develop some custom attributes to statically mark some methods for logging, so the infrastructure knows at startup what to log (for standard logging issues, like file access or cache refresh or smth like that). If using ASP.NET consider using HEalth monitoring API. Hope this helps

luckyluke