0
我試圖從Office 365網站檢索一些信息。我在執行調用時遇到了不一致的403錯誤。這種情況不規則地發生,並由IISReset解決。請幫忙。Client.executeQuery()發生403錯誤
ClientContext clientContext = new ClientContext(Constants.SP_URL);
{
SecureString passWord = new SecureString();
foreach (char c in Constants.SP_SERVICE_PASS.ToCharArray()) passWord.AppendChar(c);
var cred = new SharePointOnlineCredentials(Constants.SP_SERVICE_ACC, passWord); ;
clientContext.Credentials = new SharePointOnlineCredentials(Constants.SP_SERVICE_ACC, passWord);
Web web = clientContext.Web;
string docLibraryName = Constants.SP_PUBLISHED_LIB;
var list = clientContext.Web.Lists.GetByTitle(docLibraryName);
clientContext.Load(list);
**clientContext.ExecuteQuery();**