36

As BasicHttpsBinding is new at .net 4.5, I don't seem to be able to find much stuff around differences between the two.

dqm
  • 1,190
  • 3
  • 12
  • 19
  • Based on the name I assume one uses HTTPS as the transport and the other HTTP – paparazzo Feb 14 '13 at 16:40
  • I thought that Transport security uses https too – dqm Feb 14 '13 at 16:46
  • Only a comment. http://msdn.microsoft.com/en-us/library/system.servicemodel.wshttpsecurity The transport security for this binding is Secure Sockets Layer (SSL) over HTTP, or HTTPS. I think SSL over HTTP mean WS is doing the SSL part. Again only a comment. – paparazzo Feb 14 '13 at 17:06

1 Answers1

47

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.

jmoreno
  • 12,752
  • 4
  • 60
  • 91
Philippe
  • 4,088
  • 4
  • 44
  • 49
  • 12
    Interesting. This answer compares basicHttpsBinding & basicHttpBinding but the original question title asks the difference between basicHttpsBinding and WSHttpBinding (WS=WebService). – Zeek2 Feb 21 '18 at 10:54