Full Duplex WCF connection

Implementing a Web Service with Windows Communication Foundation is really easy. You need only a few clicks for having fun and enjoying a cup of coffee after successfuel implementation.

But what is, when you have the requirement for implementing a stable and fully duplex communication including the server may send indepently messages to any specific connected client at any time? The client and server should also detect broken connections and reconnect automatically. Thats a little more complex and you can not implement by one click. Too bad for enjoying your coffee in a few minutes.

For illustration purposes I have created a sample project. The client may request at any time a “Hello World” from server. Every 30 seconds, the server sends a “Hello World” to every connected client. In this sample application you see the mechanism how you can implement a callback contract and a duplex communication. Continue reading