微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Sharepoint online, csom ,Value 不能为空参数名称:key

如何解决Sharepoint online, csom ,Value 不能为空参数名称:key

我正在尝试在 Sharepoint Online 网站上执行 CSOM 操作,但出现以下错误

enter image description here

      Value cannot be null. Parameter name: key
  
   at System.Collections.Generic.Dictionary'2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary'2.TryGetValue(TKey key,TValue& value)
   at Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.MapPartnerSoapFault(String code)
   at Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.GetSoapException(XDocument xdoc)
   at Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.HandleWebException(WebException webException)
   at Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.DoPost(String url,String contentType,String body,

Func'2 webExceptionHandler) 在 Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.GetPartnerTicketFromAdfs(String adfsUrl,String username,String password) 在 Microsoft.SharePoint.Client.Idcrl.IdcrlAuth.GetServicetoken(String username,String password,String serviceTarget,String servicePolicy) 在 Microsoft.SharePoint.Client.Idcrl.SharePointOnlineAuthenticationProvider.GetAuthenticationCookie(Uri url,securestring password,Boolean alwaysThrowOnFailure,EventHandler'1 executionWebRequest) 在 Microsoft.SharePoint.Client.SharePointOnlineCredentials.GetAuthenticationCookie(Uri url,Boolean refresh,Boolean alwaysThrowOnFailure) 在 Microsoft.SharePoint.Client.ClientRuntimeContext.SetupRequestCredential(ClientRuntimeContext 上下文,HttpWebRequest 请求) 在 Microsoft.SharePoint.Client.SPWebRequestExecutor.GetRequestStream() 在 Microsoft.SharePoint.Client.ClientContext.GetFormDigestInfoPrivate() 在 Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest() 在 Microsoft.SharePoint.Client.ClientContext.ExecuteQuery() 在 DMSTestConsole.DMS.ConnectSite() 在 j:\lovely\DMSTestConsole\DMSTestConsole\DMS.cs:line 46

代码正在 Windows Server 2008 R2 上执行,其中还安装了本地 SharePoint 2013。 当我在 window 7 VS 2012 上执行时相同的代码工作正常。

请帮忙

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。