1

我有一个应用程序,它使用 Microsoft Dynamics CRM 的 API 来插入和更新记录。每当我连续处理少量记录时,在尝试进行其中一个更新时都会遇到以下错误:

2013-02-14 10:25:56,382 - Updating lead in dynamics with leadid [3cdaa9d4-c276-e211-99b6-005056ab0822]
2013-02-14 10:25:58,737 - GetProperty
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.ConnectStream.WriteHeaders(Boolean async)
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.Crm.SdkTypeProxy.Metadata.MetadataService.Execute(MetadataServiceRequest Request)
   at Integration.Crm.Services.Dynamics.LeadService.GetPickListvalue(String pickListlable, String logicalAttributeName) in C:\code\DynamicsIntegration\Services\LeadService.cs:line 1256

谷歌搜索,我发现了可能发生此特定错误 ( ) 的几个原因System.IO.IOException: Authentication failed because the remote party has closed the transport stream.,但在所有情况下,由于配置错误或证书损坏,它每次都会发生。

世界上有什么可能会间歇性地触发这个错误?

它与网络请求的内容无关,因为我可以在 5 分钟后处理相同的请求并且它会起作用。对此服务器的所有请求大约 10% 的折扣会导致此错误。

编辑:这里有人在使用 SharePoint 时遇到类似问题,但每次都会发生错误。

4

1 回答 1

1

使用 CRM 诊断工具打开跟踪日志记录:http ://crmdiagtool2011.codeplex.com查看您是否获得任何其他错误信息(假设您使用的是 On Premise)。我猜您从 CRM 服务器到 SQL 数据库的 SQL 连接有些不太对劲。

于 2013-02-15T15:22:53.530 回答