Access is denied - Version 5.1.1.11
System.ComponentModel.Win32Exception: Access is denied exception in Sitecore 5.1.1.11
Right, it's about 3 hours past the time where I would have normally headed home. I was, however, stuck with trying to figure out why my fully working Sitecore 5.1.1.11 installation suddenly started failing with the above message after being deployed from my development environment to my operations environment.
No fun, I tell ya :-P
So here's the deal.
Apparently 5.1.1.11 implements some (new, or for the first time - I don't know) Performance Counters. This is all good and well - I would have appreciated it a bit more though, if they in their update notes would have told me what might be needed to be done to avoid the above error.
As it turns out, your ASPNET account needs access to a specific registry key for this error to go away. Specifically: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib. So (and many probably don't know this) fire up REGEDT32.exe (Start->Run), navigate to the key, select "Permissions" from the menu - and grant the ASPNET account full control to the key.
Voila - problem solved.
Thank you very much Bruce Johnson for your blogpost about the subject (not Sitecore related, the problem is of a more general nature).
*shakes fist in the general direction of Sitecore HQ*... dudes... might wanna mention something like this, no? :-P