I have created a SharePoint 2010 (SP1) timer job which utilises the SharePoint Managed Metadata Service.
The code I have is :
// Get the taxonomy session
TaxonomySession session = new TaxonomySession(this.SharePointSite);
if (session == null)
{
LoggingService.LogVerbose("Taxonomy store unavailable");
return null;
}
// Get the default keyword TermStore for the provided site
TermStore defaultKeywordStore = session.DefaultKeywordsTermStore;
if (defaultKeywordStore == null)
{
LoggingService.LogVerbose("Default Keyword store unavailable for Taxonomy Session");
return null;
}
From time to time, defaultKeywordStore
is returned as null - occasionally, for periods, every defaultKeywordStore
is returned as null for every call.
Anyone seen this sort of behaviour before?