Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friend,
I have create a custom login page with Custom membership provider. In membership provider there is a function name validateUser(string loginname, String password)
{
SqlDataReader rdr = cmd.ExecuteReader();

if (rdr.HasRows)
{
while (rdr.Read())
{
int RetryAttempts = Convert.ToInt32(rdr["RetryAttempts"]);
if (Convert.ToBoolean(rdr["AccountLocked"]))
{
LblMessage.Text = "Account Locked, Please contact to Administrator";
ISAuthenticated = false;
}
else if (RetryAttempts > 0)
{
int AttemptsLeft = (4 - RetryAttempts);

//LblMessage.Text = "Invalid User Name and/OR password" + AttemptsLeft.ToString() + " attemp(s) left";
ISAuthenticated = false;
}
else if (Convert.ToBoolean(rdr["Authenticated"]))
{

ISAuthenticated = true;
}

}

}
else
{
//LblMessage.Text = "you are not autharised user. Please Register First";
ISAuthenticated = false;
}
}

My problem is that I am unable to assign text value in Label (LblMessage) which is on login page from membership provider class. please help

What I have tried:

Claims Walkthrough: Creating Forms-Based Authentication for Claims-Based SharePoint 2010 Web Applications Using Custom Membership and Role Providers[^]
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900