I'm looking for advice in order to deal with WCF Authentication for an application targetting both SilverLight and WPF client interface.
EDIT : Actually, the authentication mode i need is Username/Password combinaison.
In addition, in the future the application should be able to work in full-standalone mode (both client (WPF) and server on the same computer within the same application). So should i don't use WCF in that case ?
EDIT : Another addition, in the future again the application should be able to work in local network client-server mode (but without IIS), like a game. So should i don't use WCF in that case to ? Or any other option ?
You can implement your own validator by inheriting from the UserNamePasswordValidator and setting the customUserNamePasswordValidatorType in your behavior configuration like this:
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="MyNamespace.MyValidator, MyNamespace" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
On the client side you can set the username/password combination into the ClientCredentials.UserName.UserName/Password property of your service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With