问题描述
我正在尝试在 Sharepoint Online 网站上执行 CSOM 操作,但出现以下错误。
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 (将#修改为@)