<netTcpBinding> <binding name="netTcpBindingConfiguration" receiveTimeout="00:10:00"> <reliableSession enabled="true" ordered="true" inactivityTimeout="00:10:00" /> <security mode="Message"> <transport clientCredentialType="None" protectionLevel="None" /> <message clientCredentialType="UserName"/> </security> </binding> </netTcpBinding>
class UserNamePassValidator : System.IdentityModel.Selectors.UserNamePasswordValidator { public override void Validate(string userName, string password) { if( userName==null || password==null) { throw new ArgumentNullException(); } if (!(userName == "test" && password == "test") ) { throw new FaultException("Incorrect Username or Password"); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)