Unable to retrieve file information from SharePoint library using Client Object Model
问题 I am trying to read some attributes from a file in SharePoint 2010 library using client object model. Here is the sample using SP = Microsoft.SharePoint.Client; SP.ClientContext clientContext = new SP.ClientContext( "http://path/to/the/site" ); clientContext.Load( clientContext.Web ); clientContext.ExecuteQuery(); SP.File spFile = clientContext.Web.GetFileByServerRelativeUrl("/TestLibrary/sample.pdf"); clientContext.Load(spFile); clientContext.ExecuteQuery(); //here we'll catch exception But