2

I have been strugling with a problem for a while. I have created some code that utilizes the MsOnlineClaimsHelper to authenticate a sharepoint online user in order to consume the lists.asmx webservice on a sharepoint online instance.

The code runs fine in my development-environment, but once I deploy it on the server it won’t run. I have included the errormessage at the bottom of the post. The only explanation I can find is that it is related to the environment/browserversjon. Can this be the reason? My development machine runs Windows 7 with IE8, and the server runs Windows server 2008 with IE7.

And furthermore, is there any alternative method to extract data from a list in sharepoint online?

[NullReferenceException: Object reference not set to an instance of an object.] SharepointUtils.MsOnlineClaimsHelper.getCookieContainer() +191 SharepointUtils.MsOnlineClaimsHelper.clientContext_ExecutingWebRequest(Object sender, WebRequestEventArgs e) +60
Microsoft.SharePoint.Client.ClientRuntimeContext.OnExecutingWebRequest(WebRequestEventArgs args) +19
Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest() +236
Microsoft.SharePoint.Client.ClientContext.ExecuteQuery() +13
SharepointUtils.SharepointLoginHelper.GetExternalUserID(Guid g) +561
Ekademia.Web.AD.SharepointLoginRequestHandler.ProcessRequest(HttpContext context) +311
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

1

Please visit this similar post where lists in SharePoint Online is accessed through web services and had similar issues. The solution is to use Client Object Model method.

These are some articles that can help you out -

http://blogs.msdn.com/b/cjohnson/archive/2011/05/03/authentication-with-sharepoint-online-and-the-client-side-object-model.aspx

http://msdn.microsoft.com/en-us/library/hh147177.aspx#SPO_RA_CSOM

0

There are some of these claims helper classes out there that contains some bugs. Check out this post http://www.wictorwilen.se/Post/How-to-do-active-authentication-to-Office-365-and-SharePoint-Online.aspx and download the ClaimsHelper class form there and test with it.

0

I ran into this yesterday. I've found that using the MsOnlineClaimsHelper will fail on a server where Windows Identity Foundation is not installed. That may be the case for you too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.