【发布时间】:2013-02-26 18:05:38
【问题描述】:
是否可以使用带有自定义 UserNamePasswordValidator 的 BasicHttpBinding 并具有传输安全性?
- 我尝试过使用 wsHttpBinding,但是当我无法制作此链接中解释的 php soap 客户端时。 Using SOAP wsHttpBinding from PHP
- 在本指南中,他们说的好像自定义 UserNamePasswordValidator 不会在 basicHttpBinding 中被调用。 http://www.codeproject.com/Articles/36396/Difference-between-BasicHttpBinding-and-WsHttpBind
我只是从 php soap 获得 InvalidSecurity,如果我跟踪错误 Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security.
目前我正在使用带有TransportWithMessageCredential 和clientCredentialType="UserName" /> 的basicHttpBinding
如有必要,我将包含配置,但我只需要知道它是否可以完成,否则我想我必须在每个 [OperationContract] 中调用 validate 方法?尚未对此进行测试,但看到其他人谈论它。
【问题讨论】:
-
我相信
将与 basicHttpBinding 的自定义用户名密码验证器一起使用。 -
hmm 似乎无法让它与 php soap 一起工作,也许我可以尝试制作一个 wcf 客户端并尝试制作自定义用户名密码验证器来执行。不知道还能尝试什么:)
标签: wcf