title: Unable to retrieve file information from SharePoint library using Client Object Model
body: <p>I am trying to read some attributes from a file in SharePoint 2010 library using client object model.
  Here is the sample</p>
  
  <pre><code>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
  </code></pre>
  
  <p>But I am recieving exception.</p>
  
  <blockquote>
    <p>A first chance exception of type
    'Microsoft.SharePoint.Client.ServerException' occurred in
    Microsoft.SharePoint.Client.Runtime.dll</p>
  </blockquote>
  
  <p>Additional information: Value does not fall within the expected range.</p>
  
  <p>What I am doing wrong?</p>