Your AppFabroc client application may throw the following exception after you install a cumulative update package (CU) for AppFabric 1.1:

System.UnauthorizedAccessException: Access to the registry key 'Global' is denied.
   at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
   at Microsoft.Win32.RegistryKey.InternalGetValue(String name, Object defaultValue, Boolean doNotExpand, Boolean checkSecurity)
   at Microsoft.Win32.RegistryKey.GetValue(String name)
   at System.Diagnostics.PerformanceMonitor.GetData(String item)
   at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item)
   at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
   at System.Diagnostics.PerformanceCounterLib.CategoryExists(String machine, String category)
   at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName, String machineName)
   at Microsoft.ApplicationServer.Caching.ClientPerformanceCounters.InitializeClientPerformanceCounters()
   at Microsoft.ApplicationServer.Caching.ClientPerformanceCounters.IsPerfCountersEnabled()
   at Microsoft.ApplicationServer.Caching.DataCacheFactory..ctor(DataCacheFactoryConfiguration configuration)

It is a registry permission issue. The check for performance monitor counters (ClientPerformanceCounters.IsPerfCountersEnabled) was first introduced in the CU1 release. You won't see the issue in AppFabric 1.0 and 1.1 RTM.

Workaround:

  • Add the cache client application account to the following groups: Performance Monitor Users group and Performance Log Users group, and
  • Restart the cache client application

As of today, these are the AppFabric 1.1 cache client versions Microsoft has released:

RTM: 1.0.4632 (29-Nov-2011)
CU1: 1.0.4639 (20-Feb-2012)
CU2: 1.0.4644 (29-May-12)
CU3: 1.0.4652.2 (27-Nov-2012)
CU4: 1.0.4653.2 (28-Mar-2013)

CU=cumulative update