Problem adding custom performance counter instance

N

Navin Mishra

Hi,

I'm having problem adding custom performance counter INSTANCE in an
ASP.NET web service whose miltiple instances could run hosted by different
IIS AppPools on same machine. I can update my custom performance counters
WITHOUT instances just fine but when I try to specify instance name then the
counter is not updated at all and there is no error thrown also. I've
followed MSDN example to specify instance name:

// Assumes category and counter have been created.
System.Diagnostics.PerformanceCounter myCounter =
new System.Diagnostics.PerformanceCounter(
"cat","counter","instance1", false);
// Set the raw value to automatically create instance1.
myCounter.RawValue = 100;

But it doesn't work in my ASP.NET web service :( If I don't specify instance
name, it works just fine.

Has anybody seen this ?

Thanks in advance and regards

Navin
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top