I am trying to write a C# desktop app (a simple console application for now) using which I can upload a file to our Skydrive Pro instance (which is accessible using the same API's as that of SharePoint) using a REST api
I have tried a number of solutions, too many to start listing here, but given the number of roadblocks I am facing, my guess is that I am doing something fundamentally wrong.
One of the methods I used was: http://blog.cloudshare.com/2012/12/16/access-and-manipulate-data-in-your-cloudshare-sharepoint-2013-farm-from-anywhere-with-csom-rest-and-odata/ which fails in the GetFormDigest function, specifically in
HttpWebResponse responsePost = (HttpWebResponse)requestPost.GetResponse();
giving a HTTP 500 error. Looking at the error in Fiddler, it says there is an authentication issue even though I am able to see some authentication data being passed in the request, the code I used for authentication was:
requestPost.Credentials = CredentialCache.DefaultCredentials; requestPost.UseDefaultCredentials = true; requestPost.Method = "POST"; requestPost.ContentLength = 0;
Any advice\tutorials\walkthroughs would be appreciated