I have heard of this problem from several of my customers, and ran across this post the other day from Scott Densmore. Apparently its a permission problem – EntLib/Intrumentation is trying to get access to a registry key that ASP.Net does not have native access to. Its a fairly simple workaround and seems to do the trick.
Details (from the long post linked off of Scott’s blog):
- The Network Service user and the Performance Log Users and Performance Monitor Users groups did not have read permissions on the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib registry entry. As soon as this was correct the site worked just fine.
- If you are encountering this problem but for reason cannot get the permissions corrected, I also discovered a work around that you might be able to use but there is no guarantee that you won’t have other problems. After looking at the code in that PerformanceCounterInstances.CurrentInstanceName method, I noticed that they do not try to get the name of the current process using the Process.GetCurrentProcess().ProcessName property if you specify an application name with an appSettings variable in your web.config with a key of “Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager.ApplicationName”.