title: SharePoint 2013 connect 500 error
body: <p>I have found code to connect SharePoint 2013 Service Pack 1: </p>
  
  <pre><code>string siteUrl = "adress";
  
  NetworkCredential credentials = new NetworkCredential("Username", "Password");
  
  ClientContext clientContext = new ClientContext(siteUrl);
  clientContext.Credentials = credentials;
  Web site = clientContext.Web;
  
  clientContext.Load(site);
  clientContext.ExecuteQuery();
  
  Console.WriteLine("Site information: \n\n");
  Console.WriteLine("Title: {0}", site.Title);
  Console.WriteLine("ID: {0}", site.Id);
  Console.WriteLine("Language: {0}", site.Language);
  Console.WriteLine("UI Version: {0}", site.UIVersion);
  Console.WriteLine("Description: {0}", site.Description);
  Console.WriteLine("Created: {0}", site.Created);
  
  Console.ReadLine();
  </code></pre>
  
  <p>But at the line:</p>
  
  <pre><code>clientContext.ExecuteQuery();
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>An unhandled exception of type 'System.Net.WebException' occurred in System.dll
  
  Additional information: The remote server returned an error: (500) Internal Server Error.
  </code></pre>
  
  <p>Website works well, pass are ok, I have no (at least can't see) problems with IIS, so why I get this exception?</p>