Why are my custom performance counters not appearing for my service?
I've got a windows service that has a part I'm very paranoid about, so I've instrumented it with custom performance counters (I'm moving calls from mta threads to sta threads--don't ask).
The counters and the configuration section have been tested and are known to work... on my machine, but they aren't appearing on the server I installed to.
The installer doesn't create the counters. I check for the existence of the counters and create them if they don't exist before using them.
Is this not working because the service is running under the Local System account? Is there something about 2k3 boxes (R2) that prevents this from working like it does on my XP dev box? What am I missing?
My best guess is that the account that the service is running under doesn't have the permissions to create the counters. I would expect it to be throwing an exception though. Can you catch the exception and log it?