Default Credentials work in 1 project but not in another?

equalontete

New Member
I have a web service that uploads documents to Sharepoint and works fine using \[code\]System.Net.ICredentials creds = System.Net.CredentialCache.DefaultCredentials;context.Credentials = creds;\[/code\]I have re-used this code in another project and I get the error:\[code\]System.Net.WebException was unhandled by user codeMessage=The remote server returned an error: (401) Unauthorized.\[/code\]As far as I can see everything is the same in the config files and don't know why its failing. Any ideas?
 
Back
Top