Microsoft.SharePoint.Client.ServerException:'找不到ID为“ {154360b4-899f-4237-b0ed-3e35f014c748}”的类型的存根。指定的服务器可能不支持此操作中使用的API。'
projContext.ExecuteQuery()崩溃,如何解决此问题?
private const string pwaPath = "project site";
private static string projName = "project name";
private static ProjectContext projContext;
private static PublishedTask projTasks;
protected void Page_Load(object sender, EventArgs e)
{
SPSecurity.RunWithElevatedPrivileges(delegate ()
{
projContext = new ProjectContext(pwaPath);
//projContext.Load(projContext.Projects);
projContext.ExecuteQuery();
List<string> TasksID = new List<string>();
foreach (PublishedProject pubProj in projContext.Projects)
{
Console.WriteLine("\n\t{0} : {1}", pubProj.Name, pubProj.CreatedDate.ToString());
foreach (PublishedTask item in pubProj.Tasks)
{
TasksID.Add(projTasks.Name);
}
Console.WriteLine("\nProject ID : Project name : Created date");
}
Console.Write("\nPress any key to exit: ");
Console.ReadKey(false);
});
}