In a WCF endpoint, what is the difference between basicHttpBinding and wsHttpBinding? When should each be used?
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.
BasicHttpBinding is suitable for communicating with ASP.NET Web Service (ASMX) based services that conform to the WS-Basic Profile that conforms with Web Services. This binding uses HTTP as the transport and text/XML as the default message encoding. Security is disabled by default.
"Ws" is an abbreviation for "Web Services". This all play well with the fact that WsHttpBinding is the binding the use (instead of BasicHttpBinding ) when operatibility is less important, but security is more important. See this answer for great information about the two.
Ton of material on that out there - just google for "WCF basicHttpBinding wsHttpBinding".
You'll find amongst others:
Very basically:
wsHttpBinding
is more secure and reliable than basicHttpBinding
. If great compatibility is not required, wsHttpBinding
is the choice.
Ref: BasicHttpBinding vs WSHttpBinding
BasicHttpBinding
:
WSHttpBinding
:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With