最近一个项目使用WCF,常发生如下错误,大家有没有碰到,这么解决这个问题。
System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '10675199.02:48:05.4775807'. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
--- End of inner exception stack trace ---
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.FramingDuplexSessionChannel.EndTryReceive(IAsyncResult result, Message& message)
at System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
传过去的参数有问题,或者连接超时了
看起来,像是超时 '10675199.02:48:05.4775807'. --->
10675199天吗? 好疯狂啊~
楼主,检查一下2台机器的时间,然后再测试一下看看
超时了吧
两端代码都发出来才对,内容太少。