title: CSOM error on SharePoint 365 - System.Xml.XmlException was unhandled, root element missing
body: <p>I created a console application to add/update and delete item from SharePoint 365. It worked two days ago and now I am getting this error :</p>
  
  <pre class="lang-none prettyprint-override"><code>System.Xml.XmlException was unhandled
    HResult=-2146232000
    LineNumber=0
    LinePosition=0
    Message=Root element is missing.
    Source=System.Xml
    SourceUri=""
    StackTrace:
  </code></pre>
  
  <p>This is my code, I modified it from the net.</p>
  
  <pre><code>string login = "username@web365.onmicrosoft.com";   
  string password = "pooo%yup12"; //give your password  
  var securePassword = new SecureString();
  foreach (char c in password)
  {
    securePassword.AppendChar(c);
  }
  string siteUrl = "https://web365.onmicrosoft.com/sites/test";
  ClientContext clientContext = new ClientContext(siteUrl);
  
  //Add New Item
  //Create new object of List
  List newlist = clientContext.Web.Lists.GetByTitle("Test");
  ListItemCreationInformation itemInfo = new ListItemCreationInformation();
  ListItem newItem = newlist.AddItem(itemInfo);
  newItem["Title"] = "2";
  newItem.Update();
  
  var onlineCredentials = new SharePointOnlineCredentials(login, securePassword);
  clientContext.Credentials = onlineCredentials;
  clientContext.Load(clientContext.Web, w =&gt; w.Title);
  clientContext.ExecuteQuery();
  </code></pre>
  
  <p>I debugged again and I notice that the clientContext is throwing this exception
  ServerVersion = 'clientContext.ServerVersion' threw an exception of type 'Microsoft.SharePoint.Client.PropertyOrFieldNotInitializedException'</p>