我正在尝试使用 sharepoint 客户端对象模型查看我的站点中的所有列表,以下是我的代码
using (ClientOM.ClientContext ctx =
new ClientOM.ClientContext(UrlTextBox.Text))
{
//Get the site
ClientOM.Web site = ctx.Web;
ctx.Load(site);
//Get Lists
ctx.Load(site.Lists);
//Query
ctx.ExecuteQuery();
}
上面的代码抛出以下错误“远程服务器返回错误:(500)内部服务器错误”也尝试传递凭据,但没有工作,也尝试传递 DefaultNetworkCredentials。没运气..
请指教。