I have a WCF client that is talking to a WCF server (on the same computer). We use netTcpBinding with message-level security (using a custom mainPermissionMode and a custom implementation of serviceCredentials). Service marked with InstanceContextMode.PerSession .
The WCF service is hosted on a Windows service (not in IIS).
To fake keep-alive, we have a Ping method that the client calls every 15 seconds. We keep the client proxy open for the life of the client program (because session initialization is expensive in our case).
Despite this, the connection is rejected after 9 hours, 1 minute and a bit (in 10 test runs, 7 of them died after 9h1m6s).
The only thing that may result in WCF logs is the "SocketConnection aborted" message, followed by a different set of exceptions, but usually including the exception "the connection was in a failed state."
Is there some kind of timeout in WCF or in TCP / IP that causes this? Because I'm at a standstill.
wcf
Roger Lipscombe
source share