SharePoint 2013 Document Library by using OpenBinaryDirect method I got remote server 401 unauthorized error?
问题 When I am retrieving the file from SharePoint 2013 Document Library by using OpenBinaryDirect method I got remote server 401 unauthorized error? Could you please help me how to rectify the problum 回答1: Provide online-credentials by using SharePointOnlineCredentials(username,password) class in your code Code: string username="xxx"; string password="xx"; SecureString ss=new SecureString(); foreach(char c in password) ss.AppendChar(c) clientcontext.credentials = SharePointOnlineCredentials