Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

The following code generates "Specified argument was out of the range of valid values"

 TaxonomySession session = new TaxonomySession(site);

 TermStore termStore = session.TermStores["Managed Metadata Service"];

I have added the onlogged user and the user which the application pool uses to "Managed Metadata Service" and all other Services on "Manage service applications" by choosing them and click on Permissions on ribbon and check Full control, but still session.TermStores.Count is 0. I can go to the managed metadata service and see all groups and terms.

share|improve this question
    
The right index to use to access the TermStore is the proxy name probably "Managed Metadata Service Proxy", but that wont help you until you get TermStore attached/running. How to do you access the Managed Metadata through Central Admin or through Site Settings? Are you sure that Web App is connected to the Managed Metadata? –  Per Jakobsen May 14 '12 at 13:21
    
I am so sorry it was my mistake, I accessed the MMS last week and now when I test and access MMS through Central Admin it says: 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. –  Medes May 15 '12 at 8:59

1 Answer 1

Run the following PowerShell to find out what the name is of your TermStore

asnp Microsoft.SharePoint.PowerShell
$tx = Get-SPTaxonomySession -Site http://<yoursiteurl>
$tx.TermStores | ft

This should list all TermStores available for the MMS SA connected to the Site Coll (for which you provides the URL in the second line)

share|improve this answer
    
It generates following, which seems there is one: DefaultLanguage : 1033 Id : 33ac140c-73e3-458c-b31f-aa5eb86a834b Name : Managed Metadata Service WorkingLanguage : 1033 Groups : {System, Webbplatssamling - rkdhs-u} ContentTypePublishingHub: IsOnline : True KeywordsTermSet : Microsoft.SharePoint.Taxonomy.TermSet Languages : {1033} OrphanedTermsTermSet : Microsoft.SharePoint.Taxonomy.TermSet SystemGroup : Microsoft.SharePoint.Taxonomy.Group TermStoreAdministrators : {} –  Medes May 15 '12 at 9:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.