因此,我需要能够检索SharePoint 2010上文件夹中的文件名,以便我可以构建该pdf的URL。我没有在我正在开发的服务器上安装SharePoint,也无法在服务器上开发SharePoint。我得到了SharePoint客户端ddls,但我似乎无法让我的Intranet网页与SharePoint通信。如果有人可以指出我正确的方向,那将是伟大的。
这是我的一次尝试,非常确定它不对
ClientContext cc = new ClientContext("Urlgoeshere");
List partsList = cc.Web.Lists.GetByTitle("Folder Name");
CamlQuery camlQueryPartsList = new CamlQuery();
cc.Credentials = new NetworkCredential("login", "password", "domain");
camlQueryPartsList.ViewXml =
@"<View>
<Query>
<Where>
<BeginsWith>
<FieldRef Name='CustomerSpecs' />
<Value Type='Text'></Value>
</BeginsWith>
</Where>
</Query>
</View>";
partsList.GetItems(camlQueryPartsList);
cc.Load(partsList);
cc.ExecuteQuery();
我收到错误消息说无法联系指定网址urlgoeshere的网站 或者,如果我添加凭证,它表示未经授权但我已获得许可,因此不确定为什么我会这样做