【问题标题】:What is the scenario to make wsHttpBinding an alternative for netTcpBinding使 wsHttpBinding 替代 netTcpBinding 的场景是什么
【发布时间】:2012-04-09 19:50:15
【问题描述】:

我们在 asp.net webforms Intranet 应用程序中使用 netTcpBinding。

在客户端机器上,我们正在运行 activeX (winforms),它通过 wcf 检索其数据。

activeX 容器位于 asp.net 应用程序中。

相对于 netTcpBinding,使用 wsHttpBinding 有什么优势/好处?

【问题讨论】:

标签: c# wcf https nettcpbinding wshttpbinding


【解决方案1】:

使用 wsHttpBinding 的主要好处是您可以在 IIS 中嵌入 WCF 服务器,然后使用 IIS 加密客户端和服务器之间的传输。它还允许您避免防火墙问题并使用端口 80 与服务器通信。

【讨论】:

  • 也可以通过加密完全自托管 wsHttpBinding,无需为此使用 IIS。但是,IIS 确实通过针对本地计算机存储的证书注册使事情变得更容易一些。
  • 我要补充一点,使用 wsHttpBinding 还可以让您受益于 WS-Security 的标准实现以进行身份​​验证。 WS-Reliable Messaging 也包括在内,但可能不太常用。
  • @Mike 客户端在使用 wsHttpBinding(https) 时是否需要安装证书?
  • @Pascal:如果您设置 wsHttpBinding 配置,客户端只需提供客户端证书。该属性是 Security.Message.ClientCredentialType = MessageCredentialType.Certificate。查看msdn.microsoft.com/en-us/library/ms789011.aspx
  • 谢谢迈克,但我不想设置它;-)
猜你喜欢
  • 2010-12-15
  • 1970-01-01
  • 1970-01-01
  • 2022-01-22
  • 2011-06-26
  • 1970-01-01
  • 2013-09-06
  • 2018-03-09
  • 1970-01-01
相关资源
最近更新 更多