I am trying to access a project SharePoint 2010 site using the below code

using (ClientContext _clientContext = new ClientContext("https://xxx/proj"))
       _clientContext.AuthenticationMode = ClientAuthenticationMode.Default;
       NetworkCredential credentials = new NetworkCredential("user", "pwd", "domain");

                _clientContext.Credentials = credentials;

                Web _web = _clientContext.Web;
                _clientContext.Load(_web, website => website.Title);

However, I keep running into Internal server error (500)

I am able to view the site from my browser after providing my credentials.

Any suggestions on what I might be doing wrong?

Edit: just to add, if I don't send my credentials I get a 401. Is there something I need to check with a site admin?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.