如何使用 BasicHttp 绑定和无 SSL 证书保护托管在 IIS 中的 WCF 服务? [英] How do I secure a WCF Service, hosted in IIS, using BasicHttp binding, and NO SSL Cert?

查看:28
本文介绍了如何使用 BasicHttp 绑定和无 SSL 证书保护托管在 IIS 中的 WCF 服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以配置 WCF 服务:

Is it possible to configure a WCF service that:

  1. 由 IIS 托管
  2. 使用 basicHttpBinding 绑定
  3. 不需要 SSL 证书
  4. 支持会话 (ServiceContract(SessionMode:=ServiceModel.SessionMode.Required))

我知道最简单的方法是购买 SSL 证书,但由于我无法控制的原因,我需要满足上述 4 个约束条件.

I know the easiest thing to do would be to buy an SSL cert, but for reasons beyond my control I am being required to match the 4 constraints above.

谢谢,

汤姆

推荐答案

告诉你的老板 basicHttpBinding 只有在使用 SSL 证书时才支持真正的安全(否则所有数据都以纯文本形式传递)和它不支持开箱即用的 WCF 会话.WCF 会话依赖于:

Tell your boss that basicHttpBinding supports real security only when using with SSL certificate (otherwise all data are passed as a plain text) and it doesn't support WCF sessions out of the box. WCF session is dependent on either:

  • 传输会话(仅限 netTcp 或 netNamedPipe 绑定)
  • 可靠的会话(仅 netTcp、wsHttp 或自定义绑定)
  • 安全会话(仅 wsHttp 或自定义绑定,并且需要 Windows 身份验证或 SSL 证书)

会话可能可以通过构建您自己的服务行为并替换 IInstaceContextProviderIInstanceProvider 来添加.

Sessions can be probably added by building your own service behavior and replacing IInstaceContextProvider and perhaps also IInstanceProvider.

这篇关于如何使用 BasicHttp 绑定和无 SSL 证书保护托管在 IIS 中的 WCF 服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆