public override bool ValidateUser(string username, string password) { string connectionString = ConfigurationManager.ConnectionStrings["CTS"].ConnectionString + "UID=" + username + ";PWD=" + password; var provider = new MsSqlDataProvider(connectionString); return(provider.TestConnection()); }
public bool Authenticate(Credentials credentials) { string connectionString = CreateConnectionString(credentials.Username, credentials.Password); var provider = new MsSqlDataProvider(connectionString); if (provider.TestConnection()) { dataProvider = provider; User = provider.GetItem(new UserDataFilter { Login = credentials.Username }); return true; } return false; }
public bool Authenticate(Credentials credentials) { string connectionString = CreateConnectionString(credentials.Username, credentials.Password); var provider = new MsSqlDataProvider(connectionString); if (provider.TestConnection()) { dataProvider = provider; User = provider.GetItem(new UserDataFilter { Login = credentials.Username }); return(true); } return(false); }