简体   繁体   中英

UserNamePasswordValidator with basicHttpbinding and ssl

is it possible to have BasicHttpBinding with an Custom UserNamePasswordValidator and have transport security?

I just get InvalidSecurity from php soap and if I trace the error 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.

currently im using basicHttpBinding with TransportWithMessageCredential with clientCredentialType="UserName" />

i'll include the config if its necessary but I just need to know if it can be done or else I guess I have to call the validate method inside every [OperationContract] ? havent tested this yet but seen others talk about it.

ok I dont know how it works but apperently I did right all along. what made it to work was that in my php code when i specify username and password that the parameters was named.

$soapClient = new SoapClient("https://wsdl"), array('login' => "user123", 
                                                    'password' => "pass123"));

and the same in my custom username password validator. i had userName and Password before on both places and that didnt work. So i dont know the difference but it works now... maybe someone else can answer why it works this way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM