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.
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.