Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

This is my first attempt in using the the Sharepoint Client Object model. I'm writing a console application to connect to one of our sharepoint application sites. I'm trying to run a basic example to ensure connectivity but the program keeps failing with the following error: The remote server returned an error: (500) Internal Server Error.

Status: System.Net.WebExceptionStatus.ProtocolError

I don't have access to the IIS server to check the logs. My code is as follows:

        string siteUrl = "http://spsiteurl/";


        ClientContext clientContext = new ClientContext(siteUrl);
        clientContext.AuthenticationMode = ClientAuthenticationMode.Default;
        clientContext.Credentials = new NetworkCredential("...", "...", "...");

        Web oWebsite = clientContext.Web;

        clientContext.Load(oWebsite,
            w => w.Title);

        clientContext.ExecuteQuery();

        Console.WriteLine(oWebsite.Title);

I can access the sharepoint site directly if I navigate to the link. Any ideas on how I can begin to troubleshoot the error. Questions that I can direct to the our server team? I am developing from my local machine. The site resides on the same network.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.