与交通运输安全BasicHttpsBinding和WsHttpBinding的之间的区别是什么? [英] What is the difference between BasicHttpsBinding and WsHttpBinding with Transport security?
问题描述
由于BasicHttpsBinding是新的.NET 4.5,我似乎并没有能够找到围绕两者之间的差异太多的东西。
As BasicHttpsBinding is new at .net 4.5, I don't seem to be able to find much stuff around differences between the two.
推荐答案
事实上两者绑定非常相似。唯一的区别是,需要HTTPS,端点必须要与您在其中定义了安全模式为交通运输(或任何其他有效的枚举)一个basicHttpBinding的配置。随着对端点BasicHttpsBinding,安全模式默认为运输和客户端凭据类型设置为无。
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.
因此,这里是WCF 4.5之前,你的配置:
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>
使用的WCF 4.5,相同的配置可被简化为:
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>
请参阅<一href="http://blogs.microsoft.co.il/blogs/idof/archive/2011/10/10/what-s-new-in-wcf-4-5-basichttpsbinding.aspx">What’s新的WCF 4.5? BasicHttpsBinding 获取更多细节。
这篇关于与交通运输安全BasicHttpsBinding和WsHttpBinding的之间的区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!