I am creating bank application project in this project i am using sql server2008, vs2010(.net) now my problem is account login page, user enter 3 time wrong password account is blocked today only , next day(date changing) automatically activate that account how to write the code pls help me.
Thank u
hemanth
Have a column
AccountLockedUntil(which is a DATETIME NULL or similar), and set it to the following midnight when the threshold is reached. When validating the credentials, check to make sure it is either NULL or that the current time is past whatever is stored there. When the user logs in successfully, set it to NULL.To keep track of the number of failed logins, I would have a complete audit log table (logging both successful and failed attempts) plus a corresponding field on the user accounts table which counts the current number of failed logins. Strictly speaking this is a violation of database normalization, but the audit table will get huge very quickly so you don’t want to have to search through that more than necessary, and certainly not on every login attempt.