Multiple WCF EndPoints are not only about having Multiple Addresses Dude!

I read astronomical blogs on Multiple EndPoints in WCF. As a reader I find some way of ambiguity in author’s explanation to this relatively easy topic. In this post my agenda is very simple. I will not use any code or jargon to explain you multiple EndPoints. I am trying to let you understand Multiple EndPoints with simple mathematical formula.

Mathematically we can formulate EndPoint as below,

image

Where A, B and C are as follows,

image

Now it is simple mathematical addition rule that if we change any of A, B or C value then we will get new E.

image

We may have multiple EndPoints of same service in any of the following scenario,

  1. Same Service hosted on Multiple Address with same Binding and same Contract.
  2. Same Service with different Contract on same Address and for same Binding.
  3. Same Service with different Bindings on same Address and for same Contract.

To map concept of Multiple EndPoints with real world scenario then assume a business case.

  • You have a WCF Service
  • For Intranet User you do not want authentication
  • For Internet User you want authentication
  • You want Service to be hosted on same base address

In above scenario

  1. You need to have different bindings for Intranet client and Internet client.
  2. You can have basicHttpBinding for Intranet user
  3. You can have wsHttpBinding for Internet user.

Now in above business case you have same Service hosted on same Address with same Contract but with two different Bindings. Essentially you have two EndPoints for the same Service serving two different purposes.

I hope in this post I was able to explain you basic theory behind Multiple EndPoints. Thanks for reading.

7 thoughts on “Multiple WCF EndPoints are not only about having Multiple Addresses Dude!

  1. Pingback: Dew Drop – April 9, 2013 (#1,523) | Alvin Ashcraft's Morning Dew

  2. Pingback: The Morning Brew - Chris Alcock » The Morning Brew #1332

  3. Pingback: Scott Banwart's Blog › Distributed Weekly 202

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s