如何使用 BasicHttp 绑定和无 SSL 证书保护托管在 IIS 中的 WCF 服务? [英] How do I secure a WCF Service, hosted in IIS, using BasicHttp binding, and NO SSL Cert?
问题描述
是否可以配置 WCF 服务:
Is it possible to configure a WCF service that:
- 由 IIS 托管
- 使用
basicHttpBinding
绑定 - 不需要 SSL 证书
- 支持会话 (
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 证书)
会话可能可以通过构建您自己的服务行为并替换 IInstaceContextProvider
和 IInstanceProvider
来添加.
Sessions can be probably added by building your own service behavior and replacing IInstaceContextProvider
and perhaps also IInstanceProvider
.
这篇关于如何使用 BasicHttp 绑定和无 SSL 证书保护托管在 IIS 中的 WCF 服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!