Binding.ReceiveTimeout & ReliableSession.InactivityTimeout RRS feed

  • Question

  • 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.

    Saturday, October 13, 2012 12:38 PM


  • Hi Alexandru,

    >>My first question:What exactly happens when reliable sessions are enable?

    The reliable session WCF provides ensures that messages sent between endpoints are transferred across SOAP or transport intermediaries and are delivered only once and, optionally, in the same order in which they were sent. You can also find some examples of how to secure message or exchange message with a reliable sessions here.

    >>My second question: Here, why does msdn say the following?

    In other words, you should increase the ReceiveTimeout as well as InactivityTimeout, otherwise the connection will be dropped due to the expired timeout.

    Hope it helps.


    Monday, October 15, 2012 3:18 AM