Our SharePoint environment uses Claims Based Authentication - using FBA for external users and AD for internal users.
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.
The message I get when executing ClientContext.ExecuteQuery is - Cannot Contact Site at the Specified URL. I have researched this extensively and have tried numerous suggestions including the following:
- Using an event handler tied to the clientContext.ExecutingWebRequest which adds to the WebRequest headers. Solution found here https://social.technet.microsoft.com/Forums/office/en-US/16cd0e26-8f3b-4ef2-bac4-c2c59849ab96/authentication-in-clientcontext-in-sharepoint-2010?forum=sharepointdevelopmentprevious.
- Using System.Net.CredentialCache.DefaultCredentials
- Using System.Net.NetworkCredential passing in AD account
Thanks for any ideas or suggestions.
Tom
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.