No one has responded to this discussion for at least a year, so this information may be out of date. If you're looking for information about this topic, please search for a more recent discussion or post a new question.

Client Object Model

This question has suggested answer(s) This question has suggested answer(s)

Hello,

i try to get some Data from the SharePoint Online "Office365" Beta with the Client Object Model. I use an Sample from the MSDN but i always get the Error

"Server was unable to process request. ---> The server was unable to process the request due to an internal error. ...." in Visual Studio 2010.

Following the Code Snip:

 

  ClientContext clientContext = new ClientContext("https://URI.sharepoint.com/");
     

      clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
      clientContext.FormsAuthenticationLoginInfo = new FormsAuthenticationLoginInfo("USER", "PASS");

      Web web = clientContext.Web;
      ListCollection allLists = web.Lists;

      clientContext.Load(web);
      clientContext.Load(allLists);

      clientContext.ExecuteQuery();
  
      Console.WriteLine("{0} ({1})", web.Title, web.Description);

      foreach (List list in allLists)
      {
        Console.WriteLine("{0} ({1})", list.Title, list.BaseType);
      }

All Replies
  • Hi David, Mark and Majid,

    After reading the docs and your posts I ended up writing a small LINQPad sample + post for this:

    Office 365 Sharepoint 2010 Client Object Model/OData (listdata.svc) + Authentication LINQPad Sample (solutionevangelist.com/.../office-365-sharepoint-2010-client-object-modelodata-listdata.svc-authentication-linqpad-sample)

    It goes over the authentication and uses an in-process IE web browser to do the Authentication via WPF's WebBrowser control. I thought LINQPad was the perfect place to play around with the services as this is where I do all my other OData/Web Service work in the first place. It also incorporates some of your Sharepoint 2010 Client Object Model samples.

  • Mark,

    There is a great deal of interest in your MSDN article.

    When will it be published?

    Kind regards

    Neil

  • Finally we have the documentation released from SharePoint Online Team. As Mark said above the approach is same. I think, it has better namespaces references.

    msdn.microsoft.com/.../hh147177.aspx

    I've not tried this yet. Will post the feedback soon !