Hi folk's
Can any one help me out ,i done coding for if attempts 3 invalid user attempts by taking int static count variable,in that i have one drawback ,if one user made 2 invalid attempts ,and other user made 1st time invalid attempt and this account is blocking ,How can i rectify this problem can any one help me....
I placing my code below please check it out yar and tell me with one is the better option .....
static int count = 0;
public void count_log()
{
BAL_ClassLibrary.Rcm_service.LoginEntities get_login_details = login_values();
if (count >2)
{
Loginbal objbal=new Loginbal();
objbal.account_block(get_login_details);
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "Result", "alert('*Your Account is blocked')", true);
count = 0;
}
else
{
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "Result", "alert('*Invalied username or password')", true);
count++;
}
I am calling this function, when user made invalid user attempt to login...
and i incrementing the count value.....