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 responses to “Multiple WCF EndPoints are not only about having Multiple Addresses Dude!”

  1. Simple and to the point!!

  2. […] Multiple WCF EndPoints are not only about having Multiple Addresses Dude! (Dhananjay Kumar) […]

  3. […] Multiple WCF EndPoints are not only about having Multiple Addresses Dude! | debug mode…… – Dhananjay Kumar discusses the use of end points in WCF services, highlighting the various components which make up and end point […]

  4. Thanks sir.

  5. […] Multiple WCF EndPoints are not only about having Multiple Addresses Dude! * […]

  6. Great session was taken by you Sir, MCN Noida, Please share me about next session in delhi-ncr by you

  7. Dhananjay Kumar

    glad it was useful

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 )

Facebook photo

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

Connecting to %s

Create a website or blog at WordPress.com