Microsoft Windows Communication Foundation comes with a set of built-in bindings and each binding is designed to fulfill some specific need. So, if interoperability is our concern and we need to communicate with non-WCF system, then, we should go for basicHttpBinding or wsHttpBinding. Although these two bindings can work with WCF specific systems as well. But there are many differences between the two bindings.
Following table explains each of the above point in more details.
BasicHttpBinding
|
WsHttpBinding
|
|
1
|
Primarily BasicHttpBinding is designed to exchange SOAP over HTTP(s) only, just like old ASMX or .net web services and supports the WS-I BasicProfile.
|
WsHttpBinding supports the advanced WS-* specification which includes WS-Addressing and WS-Security etc.
|
2
|
It has higher level of interoperability with existing services and clients.
|
Due to more advanced messaging scenarios, it has reduced support for wider range of older clients.
|
3
|
BasicHttpBinding is based on SOAP 1.1 specification.
|
WsHttpBinding supports SOAP 1.2 specification.
|
4
|
No support for reliable Messaging.
|
Supports for reliable messaging.
|
5
|
No support for transactions.
|
It supports atomic and distributed transactions.
|
6
|
It has fewer security options. Or we can say, there is no security provided, by default, for BasicHttpBinding.
|
Because WsHttpBinding supports advanced WS-* specification, it has a lot more security options available. For example, It provides message-level security i.e. message is not sent in plain text. Also it supports for WS-Trust and WS-Secure conversation.
|
7
|
At transport level, it provides support for confidentiality through SSL.
|
It supports for both Transport as well as Message level security.
|
8
|
BasicHttpBinding is a bit faster because security is disabled by default.
|
As it supports advanced security options and its enabled by default, so it’s a bit slower than BasicHttpBinding.
|
Other Related Articles:
- What’s new in WCF 4.5
- Free Practical Guide to WCF RESTful Services
- WCF 3.5 Vs WCF 4.0 Vs WCF 4.5
- WCF Hosting (Console | Windows Service)
- 3 techniqtues for WCF Instance Management
- What is a Known Type?
- ASP.NET MVC 3 Vs MVC 4 Vs MVC 5
- 7 jQuery code snippets every web developer must have
- 3 simple steps to create your first ASP.NET Web API service
Top 10 Interview Questions and Answers Series:
- Top 10 WCF Interview Questions
- Comprehensive Series of WCF Interview Questions
- Top 10 HTML5 Interview Questions
- Top 10 ASP.NET Interview Questions
- Comprehensive Series of ASP.NET Interview Questions
- Top 10 ASP.NET MVC Interview Questions
- Top 10 ASP.NET Web API Interview Questions
- Top 10 ASP.NET AJAX Interview Questions
I think as per WCF 4, BasicHttpBinding support security by default. Please correct if I am wrong
Dear Shamsher, By default basicHttpBinding has no security support. Please look for following MS links:
http://msdn.microsoft.com/en-us/library/ms730879(v=vs.110).aspx
Thanks
I agree with Webdev. By default, binding does not provide any security, due to its interoperability feature, and hence disabled.
Check this link… http://www.encodedna.com/wcf/tutorial/what-is-an-endpoint-in-wcf.htm#basichttpbinding
Hi anonymous,
You are right and same I explained at point # 6 for BasicHttpBinding.
“It has fewer security options. Or we can say, there is no security provided, by default, for BasicHttpBinding.”
BasicHttpBinding does support message level security:
http://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpsecuritymode.aspx
promote YouTube video