I am trying to make a WCF service which uses callbacks to the client. I would like the channel to be kept open as long as there is a connection (internet, network) and either the client or channel have not explicitly closed the channel.
In order to keep the channel open (even without activity) I found the reliable sessions that WCF supports. I see that by using reliable sessions, there are two timers which one needs to take into consideration: the Binding.ReceiveTimeout
and the ReliableSession.InactivityTimeout
.
After searching on the internet, I am still unable to understand exactly how these two work together. I know that if either of the two times out, the connection goes into faulted state.
My first question: What exactly happens when reliable sessions are enable?
My second question: Here, why does msdn say the following?
Since the connection is dropped if either inactivity timer fires, increasing InactivityTimeout once it is greater than ReceiveTimeout has no effect. The default for both of these timeouts is 10 minutes, so you always have to increase both of them to make a difference when using a reliable session.