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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top