As BasicHttpsBinding is new at .net 4.5, I don't seem to be able to find much stuff around differences between the two.
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.
The default is Message . - This attribute is of type SecurityMode.
The transport security for this binding is Secure Sockets Layer (SSL) over HTTP, or HTTPS. To create an WCF application that uses SSL, use IIS to host the application. Alternatively, if you are creating a self-hosted application, use the HttpCfg.exe tool to bind an X. 509 certificate to a specific port on a computer.
Indeed the two bindings are very similar. The only real difference is that to require HTTPS, the endpoint needed to be configured with a BasicHttpBinding in which you define the security mode as Transport (or any of the other valid enumerations). With a BasicHttpsBinding on the endpoint, the security mode is defaulted to Transport and the client credential type is set to None.
So here was your configuration before WCF 4.5:
<system.serviceModel> <bindings> <basicHttpBinding> <binding name="Service.BasicHttp.BindingConfig"> <security mode="Transport" /> </binding> </basicHttpBinding> </bindings> <services> <service name="ServiceImpl"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="Service.BasicHttp.BindingConfig" name="IService.Http" contract="IService"> </endpoint> </service> </services> </system.serviceModel>
With WCF 4.5, the same configuration can be simplified to:
<system.serviceModel> <services> <service name="ServiceImpl"> <endpoint address="" binding="basicHttpsBinding" name="IService.Http" contract="IService"> </endpoint> </service> </services> </system.serviceModel>
See What’s new in WCF 4.5? BasicHttpsBinding for additional detail.
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