WCF Duplex Communication Security Configurations

01. December 2013 WCF 1

Consider the scenario where the WCF Service has been hosted on Server A where it provides call back contracts for clients to be registered with and get notifications. In order to make the communication works some security settings must be considered.

Without defining these configurations the server will be blocking the creation of any channel initiated by the client to perform the duplex communication.

In the example below the security mode “None” has been chosen. According to the security level which you want to implement on your server you might use other security mode such as Message, Transport, or TransportWithMessageCredential.

Service configuration

In the service endpoint configuration add an identity configuration to the dual endpoint.

In the binding configuration add security configuration with mode as “None”:

Client configuration

In the client endpoint configuration add the same identity value as it has been defined on the server configuration:

In the client endpoint configuration add the same identity value as it has been defined on the server configuration:

In the binding configuration follow the same security mode as in the server configuration:

Please note that in order for the duplex communication to work the server must be able to ping the each client by its machine name. You need to check you network DNS Server to make sure the server and clients can see each other.

You can use hosts file on the server and map each machine’s name to their respective IP address.


1 thought on “WCF Duplex Communication Security Configurations”

  • 1
    Russ Peterson on December 5, 2014 Reply

    What about the case where a DNS server is not used ? On a closed network ? This is where I
    have the same problem described above. On the
    corporate network, though, no problem.

Leave a Reply

Your email address will not be published. Required fields are marked *