New answers tagged wcf
It won't work with default credentials because application pool identity is not there in normal context. If you check the result of System.Security.Principal.WindowsIdentity.GetCurrent() method, you'll see it returns IUSR instead. If you want to execute code with app pool credentials, you need to elevate permissions using ...
You have to log in to target site manually, with that service account. Seems like the client just can not login to the site at the first time.
Set the authentication mode as shown below context.AuthenticationMode = ClientAuthenticationMode.Default; Also make sure the application pool account under which the service is hosted in IIS has proper access to SharePoint document library.
Top 50 recent answers are included