wcfduplexwsdualhttpbinding

Duplex WCF service channels continuously alive (WSDualHttpBinding)


The arhitecture:

  1. console application that contains a wcf duplex service;
  2. windows app consumers; every app subscribe to Duplex, so we have a list of subscribers and the service must send notifications to some of them in case that some events apper;

The problem:

  1. how to maintain the connection alive continuously so that the service can send notifications to clients ?

I found that there are 2 channels for this binding. I need to have permanently the channel from service (for callbacks) open.

Thanks;


Solution

  • As long as a client is connected to the service, the callback channel will be alive. Once the client disconnects (or the channel gets faulted), the callback channel will close.