TaxonomySession session = new TaxonomySession(site);
session.GetTermSet(session.DefaultSiteCollectionTermStore.Name, termGroup, termsetName);
In a new environment this often results in an obscure "NullReferenceException: Object reference not set to an instance of an object.". However, nothing seems wrong in the MMS, service application associations (the MMS is in the default group), or the site itself. The problem is in the MMS applicatino's proxy. In the Service Applications list, highlight the MMS application proxy, click Propertys in the Ribbon, the proxy application's properties show up in a modal dialog. Notice that the 2nd checkbox is unchecked:
It's unclear why a MMS proxy would be created this way. Could be a minor bug. This is what determines the DefaultSiteCollectionTermStore for a site collection though. Check this, and the code would go through succcessfully.
4 comments:
You saved my day. Thanks
Awesome Stuff.. Saved my Days :)
Good Work. :) Saved my time.
Thanks
Post a Comment