具有 .NET 2.0 和 Java 客户端的 WCF 服务
我的 WCF 服务是通过 .NET 3.5 完成的,我在实现服务时使用了 wsHttpBinding。
对于 .NET 3.5 客户端,没有问题,但 .NET 2.0 和 Java 客户端在 wsHttpBinding 中存在问题。
因此,我添加了一个带有 basicHttpBinding 的新端点,其安全性与 wsHttpBinding 类似,并考虑以下标准:
- 我想在启用传输安全性的情况下使用自定义用户名/密码验证。
- 无法进行 Windows 身份验证。
- 我不想将自定义标头添加到 SOAP 消息中以进行身份验证。
我的基本HttpBinding配置是:
<basicHttpBinding>
<binding name="MyService.basicSecureBinding">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" proxyCredentialType="None"/>
<message clientCredentialType="UserName" algorithmSuite="Basic128"/>
</security>
</binding>
</basicHttpBinding>
并在ServiceBehavior中声明自定义UsernameValidator类。
但似乎“TransportWithMessageCredential”不能从.NET 2.0客户端使用 为了启用自定义用户名验证,消息安全是必要的。
您有什么建议或参考来解决这个问题吗?
My WCF Service is complete with .NET 3.5 and I used wsHttpBinding while implementing my service.
For .NET 3.5 clients, there were no problems, but .NET 2.0 and Java Clients had issues in wsHttpBinding.
So I added a new endpoint with basicHttpBinding with similar security as wsHttpBinding with following criteria in mind:
- I would like to use Custom Username/PasswordValidation, while Transport Security is enabled.
- Windows authentication is not possible.
- I would rather not to add custom Headers to the SOAP messages for authentication.
My basicHttpBinding Configuration is:
<basicHttpBinding>
<binding name="MyService.basicSecureBinding">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" proxyCredentialType="None"/>
<message clientCredentialType="UserName" algorithmSuite="Basic128"/>
</security>
</binding>
</basicHttpBinding>
and in ServiceBehavior Custom UsernameValidator Class is declared.
But it seems that "TransportWithMessageCredential" cannot be used from .NET 2.0 clients
and in order to enable custom username validation, Message security is necessary.
Do you have any suggestions or references to solve this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您应该在 .NET 2.0 端使用 WSE 。
此链接可能对您有帮助:
WCF 和 WSE 3.0 之间的互操作性
I think you should use WSE on the .NET 2.0 side.
This link may help you:
Interoperability between WCF and WSE 3.0