使用Microsoft.Sharepoint.Client.Taxonomy.dll从Sharepoint 2010 Server获取TaxonomySession TermStore TermSet术语

时间:2012-12-20 12:31:26

标签: sharepoint-2010 client taxonomy

我正在编写一个c ++ / c#客户端应用程序,以便与使用分类法的Sharepoint 2010网站进行通信 我从以下网站下载并安装了Microsoft.Sharepoint.Client.Taxonomy.dll http://download.microsoft.com/download/E/1/9/E1987F6C-4D0A-4918-AEFE-12105B59FF6A/sharepointclientcomponents_x64.msi

客户端用户可以通过从分类法术语集中收集的值的下拉列表中选择值来输入表单中的值。为了获取TermSet,我必须首先获得TaxonomySession:

TaxonomySession taxonomySession = TaxonomySession.GetTaxonomySession(clientContext);
clientContext.Load(taxonomySession, 
    ts => ts.TermStores.Include(
    store => store.Name,
    store => store.Groups.Include(
    group => group.Name))
);
try
{
    clientContext.ExecuteQuery();
}
catch (Exception e)
{
    string err = e.Message; // Cannot find proxy for type with id "{981cbc68-9edc-4f8d-872f-71146fcbb84f}"
}

我不确定原因是对于Sharepoint 2010服务器使用Microsoft.Sharepoint.Client.Taxonomy.dll(Sharepoint 2013)是否违法,或者我是否做错了

1 个答案:

答案 0 :(得分:0)

对Sharepoint 2010服务器使用Microsoft.Sharepoint.Client.Taxonomy.dll(Sharepoint 2013)只会呈现错误。

sharepoint 2010有一个服务端dll(Microsoft.Sharepoint.Taxonomy.dll),但是您必须在服务器场中的一台sharepoint计算机上。 (我认为需要.NET 3.5,在.NET 4.0中不起作用)