On a server that is running Microsoft SharePoint Foundation 2010 or SharePoint Server 2010, you try to start the UserCode service (SPUserCodeService). The UserCode service does not start on this server because a performance counter call fails, and you receive the following error code in the ULS logs:
This issue occurs when the user account under which SPUserCodeService is configured to run does not have the necessary permissions to access the performance counters on the Windows 2008 server.
To work around this issue, verify that the user account under which SPUserCodeService is configured to run has permissions to access the performance counters. To do this, add the user account to the 'Performance Monitor Users' and 'Performance Log Users' group and grant the following permissions: