Click here to Skip to main content
15,032,967 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Problem with the Performance monitor counters.There is a parameter called JackpotHitCount which I have created in DataCollectorSet in Performance Monitor.I am able to retrieve the current JackpotHitCount value when i run the Service using the Visual Studio Code(Debug Mode).But When I run the Service using the Installer(in Services.msc) the JackpotHitCount Value is resetting to 0.I am not able to retrieve the current value.Can someone please help me with this issue?

1 solution

The most likely difference is that when you run it in visual studio it is running as you (the user) whereas when it is running as a service it is running as whatever user the service is set to run as.

Maybe that user can't see/read the JackpotHitCount performance monitor counter?
Cenarjun 7-Aug-15 2:51am
When it is running as a service,it has administrator rights.Administrator has read/write permissions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900