trend Posted July 10, 2005 Posted July 10, 2005 (edited) I am logging date/time/username/IP/Payload to a ms sql db everytime a user tries to log in. (payload = 'auth failed' or 'auth successful') I want to set it up so, if a user fails to provide a valide username/pw 3 times within 30 minutes, he will not be able to login for the next 30 minutes (30 minutes can start from his first login attempt.. or last.. i don't care) This is what I have so far: Dim MyCommand As New OleDbCommand("SELECT * FROM Login_Attempts WHERE Username = '" & UsernameTry & "' and Payload = 'Auth Failed'", MyConnection) So right now.. it isn't even checking the time or date.. But I stored the time via: date.Now.ToLongTimeString (but I could store this differently) and Date.Now.Date How can I check and see if a user has failed to login 3 times with 30 minutes? thanks Lee Edited July 10, 2005 by trend Quote
trend Posted July 10, 2005 Author Posted July 10, 2005 (edited) Found good code: http://www.syncfusion.com/FAQ/aspnet/WEB_c2c.aspx#q96q Just had to mod it a little Edited July 10, 2005 by trend Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.