title: Experiencing ServerException in .NET C# MVC 3 when querying SharePoint 2010 list with CAML
body: <p>I am attempting to fetch a single item from a SharePoint 2010 list. I am using .NET C# MVC 3 framework.</p>
  
  <p>I am receiving the runtime error "ServerException, Exception from HRESULT: 0x80131904" from the ExecuteQuery() method in the following block of code.</p>
  
  <pre><code> ClientContext spContext = new ClientContext(Settings.Default.SharePointSite + Settings.Default.SharePointWeb);
  spContext.Credentials = new NetworkCredential("[REMOVED]", "[REMOVED]", "[REMOVED]");
  var list = spContext.Web.Lists.GetByTitle("ExampleList");
  
  var camlQuery = new CamlQuery();
  camlQuery.ViewXml = "&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='UniqueId'/&gt;" +
      "&lt;Value Type='Lookup'&gt;" + id.ToString() + "&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;";
  
  var items = list.GetItems(camlQuery);
  
  spContext.Load(items);
  spContext.ExecuteQuery();
  </code></pre>
  
  <p>If an empty CAML query is passed, "items" is populated will all elements of the list, so the basic connection is working. Introducing any CAML to .ViewXML has resulted in either the already stated exception or has not affected the resultset of "items" (as in, all items have been returned).</p>
  
  <p>Any help that you can provide is appreciated.</p>