Sharing a physical address between multiple endpoints

WCF supports exposing a single service through multiple heterogeneous endpoints. Another great feature is letting multiple endpoints listen over the same physical transport address. For example, you want to host a WCF service that has multiple endpoints exposed. However, you only have a single HTTP URL open for listening. Then you can use this feature to make all those endpoints (as long as they’re using the same transport protocol) listen on the same URL.

How to do it...

Our sample service will expose two endpoints (one is IFoo and the other is IBar) and both of them will listen on the same HTTP URL:

  1. The first thing we need to do is configure the service endpoints. We will still specify different ...

Get Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.