使用 WCF 连接到 https 后面的 asmx 页面,仅需要签名
我正在尝试连接到一个 Web 服务,该服务要求我在连接之前使用证书进行签名。
在 WSE 3.0 中,我所要做的就是创建一个证书策略并选择“仅签名”单选按钮。这在 WSE 3.0 中运行良好,但我想在 Visual Studio 2008+ 上使用它(wse 3.0 仅支持 2005)。为了绕过 2005 年唯一的 WSE 限制,我正在尝试将我的应用程序转换为 WCF。
我阅读了有关将 WSE 转换为 WCF 的 MSDN 文章(例如 2004 年 8 月的限制),但它没有提及任何有关保护级别的内容。
从表面上看,支持 utf-8 的默认绑定不支持仅符号保护级别。不支持 utf-8 的默认绑定(如 tcp 内容)支持,但这并不能真正帮助我了解如何尝试连接到 asmx 页面。 customBinding 似乎是关键(如 MSDN 文章中所述),但我找不到任何不需要加密的有效保护级别。
有什么建议吗?我有什么明显遗漏的吗?
I'm trying to connect to a web service that requires me to sign with a certificate before I connect.
In WSE 3.0, all I had to do is create a certificate policy and choose the "sign only" radio button. That worked fine in WSE 3.0, but I want to use this on Visual Studio 2008+ (wse 3.0 only supports 2005). In order to get around the 2005 only WSE limitation, I'm trying to convert my app to WCF.
I read the MSDN article on converting WSE to WCF (such as the Aug2004 limitation), but it fails to mention anything about protection levels.
From the looks of it, the default bindings that support utf-8 don't support sign only protection levels. The default bindings that don't support utf-8 (like the tcp stuff) do, but that doesn't really help me seeing how I'm trying to connect to an asmx page. The customBinding seems to be the key (as stated in the MSDN article) but I can't find any valid protection levels that don't also require encryption.
Any suggestions? Is there anything obvious I'm missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以指定独立于消息安全性(签名和加密)的传输安全性(身份验证)。从您的问题中我不清楚您是否需要通过证书身份验证实现传输安全 或使用客户端证书实现消息安全,但这两种情况都是支持。
请参阅文档了解<安全性>部分了解详情。
为了更广泛地了解 WCF 安全选项,本文提供了很好的概述。
You can specify a transport security (authentication) independently from the message security (signing and encryption). I'm not clear from your question whether you need transport security with certificate authentication or message security with a client certificate, but both scenarios are supported.
Please see the documentation for the <security> section of the <basicHttpBinding> for details.
For a more broad understanding of WCF security options, this article provides a good overview.