1

I'm trying to grant an application running as a service on a Windows 2012 R2 machine to create performance counters. I tried to add the service account the application is running under to the "Performance Monitor Users" group (as suggested in some forums) but it didn't make any difference. The application gets an access denied when accessing in order to create the performance counter category and the performance counter itself:

  • HKLM:\SYSTEM\CurrentControlSet\Services
  • C:\Windows\Inf

Is there a proper way of granting an application permissions to create performance counters? Because the only way I see is to set the account as local admin and it looks to me like an overkill.

3 Answers 3

2

This may be a little late as an answer but as I found this question others might too, we had a similar problem and we found from other posts that we had to add the account to the local group 'Performance Log Users' on the server, this solved our issue.

1) Open the Computer Management tool.

2) Select Local Users and Groups -> Groups

3) Select the "Performance Log Users" group and add your service account.

1
  • I tried but failed, my scenario is: my web app using PerformanceCounterCategory is hosted in IIS, the application pool's user is not an administrator, I've already added the user to the 'Performance Log Users' group, but in runtime the UnauthorizedAccessException still raises Mar 3, 2021 at 8:09
0

Check your firewall to see if a rule is blocking the application. Recently I had to change firewall rules to allow some trusted applications to run from one network to the other. It is possible to create rules for specific applications.

1
  • Hi, I don't think this has nothing to do with firewall rules. it's all on the same server.
    – gigi
    Dec 18, 2017 at 14:58
0

To create a performance counter you must be administrator. There is no way to grant permissions to an application to create performance counters other than running the application as an administrator. The correct way to create the performance counters is during the application setup.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .