In this section, we’ll see when to choose which binding. Below I have pasted one simple self-descriptive decision tree.
Let me explain the same. So, before choosing any binding 1st question we’ll ask is are we inside a firewall? Then if answer is no and we are using .Net to .Net communication then in that case, we can go for WsHttpBinding as it supports complete WS-* stack and much more feature rich than the basic one. Now, if Client is not .Net to .Net, then do you need to support older version of java clients or .Net 2.0 or below, then you can use BasicHttpBinding. Here, you won’t get any out of the box features provided by WS-* stack but at least you can communicate.
However, if you are inside the firewall and client is not .Net to .Net, then you can ask Supporting Older Version question. And if it’s a .Net client and inside the Firewall, then next question would be if it sits in the same machine or in other words its local In-Process only then you can use NetNamedPipeBinding. And if the client is not on the same machine and it’s more conventional like server on one machine and client on other, then next question I would ask is whether you need Disconnect? If the answer is yes, then you should use NetMSMQBinding. If the answer is no, then next question I would ask is whether you need reliability? Now, if you don’t require reliability you can use NetUDPBinding otherwise NetTcpBinding. So, this is the most common use case of before choosing any binding.
Thanks for joining me.
1,832 total views, 1 views today