1

Error Message:

System.ServiceModel.CommunicationException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.

Client: Windows .NET 4.0 framework Server: UNIX

Issue : The webservice connection was working fine with out any issues. But sometimes it was throwing the connection was closed error. I am new to .Net frame work and i know the basis. Please guide me how to fix this issue.

Work Around: After recycling the application pool the issue was fixed. (Actually we are closing the old connection and re-establishing).

Any information to fix this issue will be greatly appreciated.

4

1 回答 1

0

您必须将 KeepAlive 属性设置为 False,以便连接将自行关闭并为每个请求重新打开。这将避免尝试使用关闭连接的问题。

于 2016-07-18T17:32:57.727 回答