Sign up for Office 365
Learn more about Office 365
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); }
Are you sure that the /_vti_bin/authentication.asmx web service is not available?
because I can see it in my sitecollection at: <name>.sharepoint.com/.../authentication.asmx.
The only thing is that when I use the AuthenticationService.Login(uname, pass) method to login to the sitecollection, I get the following error:
Server was unable to process request. ---> The server was unable to process the request due to an internal error.
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 !