The Managed Metadata Service or Connection is currently not available

The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator

The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator.

This error shows up on the Term Store Management page, located in Central Administration and a site's Site Settings page. When I get this error it's usually when building a new farm and its cause is one of a handful of simple things, each with it's own simple fix. Guru Pratap from Microsoft has a great blog post about this error with the common resolutions: SharePoint Error : The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started.

Today I was looking at a couple of new development VMs that had the issue where it was working in Central Administration but not in Site Settings. None of the usual fixes worked. In fact, all of the settings had been correctly applied before I even looked at the server.


I checked the ULS logs and found an exception suggesting invalid access while trying to write to a registry key:

Failed to get term store during cache check for changes.  Proxy 'Managed Metadata Service'. Exception: System.Security.SecurityException: Requested registry access is not allowed.
     at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
     at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication.GetMOSSInstallPath()
     at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplicationProxy.GetChannel(Uri address, Boolean& cachedChannel)
     at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplicationProxy.<>c__DisplayClass2f.<RunOnChannel>b__2d()
     at Microsoft.Office.Server.Security.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
     at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplicationProxy.RunOnChannel(CodeToRun codeToRun, Double operationTimeoutFactor)
     at Microsoft.SharePoint.Taxonomy.Internal.TaxonomyProxyAccess.GetChangeTime(Guid rawPartitionId, Nullable`1 groupGuid, Nullable`1 termSetGuid)
     at Microsoft.SharePoint.Taxonomy.Internal.DataAccessManager.GetChangeTime(Nullable`1 groupGuid, Nullable`1 termSetGuid) 
at Microsoft.SharePoint.Taxonomy.Internal.TaxonomyCache.CheckForChanges(Boolean enforceUpdate)
The Zone of the assembly that failed was:  MyComputer
Failed to get term store for proxy 'Managed Metadata Service'. Exception: System.Security.SecurityException: Requested registry access is not allowed.
     at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
     at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication.GetMOSSInstallPath()
     at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplicationProxy.GetChannel(Uri address, Boolean& cachedChannel)
     at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplicationProxy.<>c__DisplayClass2f.<RunOnChannel>b__2d()
     at Microsoft.Office.Server.Security.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
     at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplicationProxy.RunOnChannel(CodeToRun codeToRun, Double operationTimeoutFactor)
     at Microsoft.SharePoint.Taxonomy.Internal.TaxonomyProxyAccess.GetChangeTime(Guid rawPartitionId, Nullable`1 groupGuid, Nullable`1 termSetGuid)
     at Microsoft.SharePoint.Taxonomy.Internal.DataAccessManager.GetChangeTime(Nullable`1 groupGuid, Nullable`1 termSetGuid)
     at Microsoft.SharePoint.Taxonomy.Internal.TaxonomyCache.CheckForChanges(Boolean enforceUpdate)
     at Microsoft.SharePoint.Taxonomy.Internal.TaxonomyCache.GetCache(TermStore termStore, Boolean updateCache)
     at Microsoft.SharePoint.Taxonomy.TermStore.get_Cache()
     at Microsoft.SharePoint.Taxonomy.Internal.SharedItemManager.GetTermStore(Boolean addOfflineWhileFetching, Boolean& partitionCreated)
     at Microsoft.SharePoint.Taxonomy.TermStore.Initialize(MetadataWebServiceApplicationProxy proxy, Guid partitionIdRaw)
     at Microsoft.SharePoint.Taxonomy.TermStore..ctor(MetadataWebServiceApplicationProxy applicationProxy, TaxonomySession session, Guid rawPartitionId, Boolean updateCache)
     at Microsoft.SharePoint.Taxonomy.TaxonomySession.Initialize(TaxonomySessionContext sessionContext, Boolean updateCache, SPWeb webForPermissions, SPList listForPermissions, Boolean includeOfflineTermStores)  The Zone of the assembly that failed was:  MyComputer


Searching for the exception I found a TechNet forum post that outlined what I had planned to do next: check which registry key was trying to be accessed and grant the permissions: Managed Metadata Service not working


Before I started changing permissions, I looked at the WSS_ADMIN_WPG local machine group to make sure that it existed and it contained the web application pool service account. The WSS_ADMIN_WPG group provides write access for SharePoint service accounts to local resources like files and registry keys on the local server.

An example of the WSS_ADMIN_WPG group membership. The application pool account is a member.

In this case, the service account was in the group which means the Term Store Management page should be working. Knowing this, all we need to do is fix the permissions. Microsoft has documented the permissions on TechNet in Account permissions and security settings. Rather than doing this by hand, or running the risk that some of the other permissions were not correctly set, you can run the Initialize-SPResourceSecurty cmdlet  in an elevated SharePoint Management Shell. This will reset all file system and registry permissions.

Initialize-SPResourceSecurity


Running Initialize-SPResourceSecurity. If it works there should be no output.

After running, reloading the Term Store Management page displays the page as expected:


The now working Term store management page

Stories say it best.

Are you ready to make your workplace awesome? We're keen to hear what you have in mind.

Interested in learning more about the work we do?

Explore our culture and transformation services.