Click here to Skip to main content
15,880,972 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to access documents from a sharepoint site , I am accessing from client machine , Sharepoint in install on another machine (server) by using microsoft.sharepoint.client.dll

C#
using (ClientContext clientContext = new ClientContext("http://sharepoint/sites/SPTest"))
                {
                    clientContext.Credentials = new NetworkCredential("Administrator", "Admin13", "sharepoint");
                    Web web = clientContext.Web;                    
                      Folder folder = web.GetFolderByServerRelativeUrl("Documents");
                      clientContext.Load(folder);
                      clientContext.ExecuteQuery();                    
                   
                        foreach (Microsoft.SharePoint.Client.File file in folder.Files )
                        {
                            MessageBox.Show(file.Name);
                        }
                    }


I just want to access the properties of documents . The above code doesn't gets files out of that folder
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900