.net – How to get reliable call-backs with WCF using NetTcpBinding

callbacknetnettcpbindingwcf

I am planning to use the NetTcpBinding for an application that needs to keep a hand-full of clients in sync.

Whenever there is a change of state at the server, all the connected clients must be informed.

However I need the clients to automatically reconnect if there is a network problem, any outstanding callbacks from the server for the given client should not get lost.
I also need to the client’s GUI code to be informed if the connection to the sever is lost and cannot be recreated. (or if the server restarts)

Does the NetTcpBinding with
WS-ReliableMessaging give me this “out
of the box”?

Best Answer

Check out this article here: Introduction to Reliable Messaging with the Windows Communication Foundation under the section titled "Reliable Messaging Session Options". Specifically the MaxRetryCount property may be what you're looking for.