在iis另一台计算机上部署后使用c#访问sharepoint网站的问题

时间:2019-06-14 17:14:51

标签: c# sharepoint iis-8

我已经用C#编写代码来访问Sharepoint站点,该站点在我的本地计算机上运行良好,但是在IIS上部署后,另一台计算机无法运行。我检查了日志,发现超时错误。下面是我的代码:

context.Credentials = new SharePointOnlineCredentials(uname, passWord);

Web web = context.Web;
context.Load(web);

List list = context.Web.Lists.GetByTitle(listName);
context.Load(list);
context.Load(list.RootFolder);
context.Load(list.RootFolder.Folders);
context.Load(list.RootFolder.Files);
context.ExecuteQuery();

0 个答案:

没有答案