是什么导致我的系统间歇性故障.网WebException错误

本文关键字:故障 WebException 错误 我的 系统 是什么 | 更新日期: 2023-09-27 17:59:30

我有一个应用程序,它使用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.)的一些原因,但在所有情况下,由于配置错误或证书损坏,每次都会发生。

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

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

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

是什么导致我的系统间歇性故障.网WebException错误

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