Performance Counter Update problem in ASP.Net application

J

jvn

I am experiencing a particular problem with performance counters.
I have created a set of classes, that uses
System.Diagnostics.PerformanceCounter to increment custom performance
counters (using .Net 2.0)
The performance counter categories have been successfully created.
When the set of classes are used by a WinForm test harness application,
they function as expected, and the performance counters can be seen to
be updated by using the performance monitor.
When the set of classes are used by a web service, the performance
counters do not seem to be updated in the performance monitor.
There are no exceptions being raised, and there are no entries in the
event log.
I have made the ASPNET user a member of the administrators group on the
development server, in order to eliminate permissions problems. The
problem still occurs.
I have tested the application on both Windows XP (SP2) and Windows
Server 2003 - exact same issue appears.
Can anyone help me to determine why performance counters are not
updated, when they are being incremented via an ASP.Net application ?
 
J

jvn

I have found a solution, but would like further feedback on the
solution.
Solution is as follows: I am creating multininstance performance
counters, and the name of each instance was the appdomain's friendly
name.
Since the application was an ASP.Net application, the appdomain name
would be of the form xx/xxx/xxxx etc. The performance counters object
interprets the instance name to include a performance counter PARENT
name (the string before the first forward slash). I am unsure what the
parent attribute of a performance counter means, but as soon as I
changed the instance name to the appdomain name with no "/" characters,
the counters started updating correctly.
I would really appreciate any further information anyone has on the use
of performance counter parent and instance attributes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top