![](/img/trans.png)
[英]WCF BasicHttpBinding + UserNamePasswordValidator+x.509
[英]UserNamePasswordValidator with basicHttpbinding and ssl
是否可以使用具有自定义UserNamePasswordValidator的BasicHttpBinding并具有传输安全性?
我只是从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.
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.
目前,我正在使用basicHttpBinding和TransportWithMessageCredential
以及clientCredentialType="UserName" />
我将在必要时包含配置,但我只需要知道它是否可以完成,否则我想我必须在每个[OperationContract]
调用validate方法? 还没有测试,但是看到其他人在谈论它。
好的,我不知道它是如何工作的,但是我一直正确地做着。 使它起作用的原因是在我的php代码中,当我指定参数的用户名和密码时。
$soapClient = new SoapClient("https://wsdl"), array('login' => "user123",
'password' => "pass123"));
和我的自定义用户名密码验证器中的相同。 我之前在两个地方都有userName
和Password
,但没有用。 所以我不知道有什么区别,但是它现在可以工作了……也许其他人可以回答为什么这样工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.