title: SharePoint Client Side Object Model - Cannot Contact Site at the Specified URL - Mixed Authentication
body: <p>Our SharePoint environment uses Claims Based Authentication - using
  FBA for external users and AD for internal users. </p>
  
  <p>I have not been able to connect using default credentials or Windows
  authentication to a test SharePoint site using the SharePoint Client
  Side Object Model (CSOM). I am able to connect using an FBA user but
  require connecting using default credentials (assuming this is the
  app pool id tied to the SharePoint application) or at least an AD
  account.</p>
  
  <p>The message I get when executing ClientContext.ExecuteQuery is - <strong>Cannot Contact Site at the Specified URL</strong>. I
  have researched this extensively and have tried numerous suggestions including the following:</p>
  
  <ol>
  <li>Using an event handler tied to the clientContext.ExecutingWebRequest
  which adds to the WebRequest headers. Solution found here 
  <a href="https://social.technet.microsoft.com/Forums/office/en-US/16cd0e26-8f3b-4ef2-bac4-c2c59849ab96/authentication-in-clientcontext-in-sharepoint-2010?forum=sharepointdevelopmentprevious" rel="nofollow">https://social.technet.microsoft.com/Forums/office/en-US/16cd0e26-8f3b-4ef2-bac4-c2c59849ab96/authentication-in-clientcontext-in-sharepoint-2010?forum=sharepointdevelopmentprevious</a>.</li>
  <li>Using System.Net.CredentialCache.DefaultCredentials </li>
  <li>Using System.Net.NetworkCredential passing in AD account </li>
  </ol>
  
  <p>Thanks for any ideas or suggestions. </p>
  
  <p>Tom</p>
  
  <hr>
  
  <p>I should have mentioned that we are using SharePoint 2010 and that I'm trying to retrieve and update user profile properties. As I was beginning to code a solution to do this (using my FBA connected ClientContext), I read that in SharePoint 2010, you can only update user properties using the UserGroup web service. I get an Access Denied when trying to connect via the web service. I believe the ClientContext sits on top of the web services so the scenario/issue is the same. Again, any thoughts or suggestions are greatly appreciated.</p>