Reputation: 5021
I am new to WCF and I learned that using WCF you can communicate between two or more distributed systems over various protocols and message formats. So far for practice purposes I have used basicHttpBinding. But for demonstration purposes I want to be really convinced where to use netTcpBinding or etc. Please tell me the scenario where net.TcpBinding becomes really useful and almost a must to opt for. Also as far as I know it is one of the major advantages that WCF offers over it's traditional various counterparts such as ASP .Net Web Services that it can seamlessly communicate over various protocols which other traditional Web Services can't. Is it true ? Please clarify.
Upvotes: 1
Views: 97
Reputation: 2903
Here are some difference which will help you to understand the answer
BasicHttpBinding - main feature: uses WS-I Basic Profile 1.1 standart mainly used for consuming the old ASMX WebServices. Other important features, you must pay attention on:
Works over http protocol Supports security according to BasicHttpSecurityElement (None/Transport/Message/TransportWithMessageCredential/TransportCredentialOnly) Supports message encoding with Mtom (Message Transmission Organization Mechanism 1.0 (MTOM) encoder), used for tranfer of messages with large binary attachments
NetTcpBinding - main feature: uses WS-* standart (has more features then WS-I Basic Profile 1.1) for deploying and consuming of the .NET WCF services in cross-machine communication environment. Other important features:
Works over tcp protocol Supports security according to NetTcpSecurityElement (None/Transport/Message/Both) Supports transactions Supports reliable sessions (can support exactly-once delivery assurances)
Choosing a Transport This link is worth looking at
Upvotes: 1
Reputation: 171246
Performance is much better with a binary protocol. Serialization is faster and the network is used less.
Also, the NetTcp binding supports more of .NET, for example generics. It is based on BinaryFormatter
.
Also see burning_LEGION's diagram, I'm not going to copy it over.
Upvotes: 1