7.4. Router Service

WCF4 has great new routing capabilities that save you from writing your own message-routing solution. A routing solution can be very useful for many scenarios, such as

  • Crossing network boundaries

  • Redundancy—providing alternative endpoints in case of failure

  • Load balancing

  • Bridging of different protocols

  • Versioning

  • Providing an additional layer of security

WCF4's routing capabilities support all of these scenarios and allow you to listen for incoming WCF communications and route them, depending on customizable criteria. Let's create a simple routing example now to route messages from one endpoint to another.

7.4.1. Routing Example

We will create a very simple routing service that will listen for all calls to the endpoint http://localhost:1000/Router ...

Get Introducing .NET 4.0: with Visual Studio 2010 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.