最近在公司项目中,遇到莫名其妙的异常,就是当使用Windows Service作为WCF服务端宿主程序,并且使用netTcpBinding的时候,Windows服务会时不时的Crash掉。通过分析处理UnHandledException记录下的日志,异常信息大致如下:
[10/26/11 10:10:16.011],[35],ERROR,”Encountered an unhandled thread exception: 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.IO.IOException: The read operation failed, see inner exception. —> 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