Asp.net forms authentication – how do I set wait time for failed l

J

Jane

I am ASP.NET newbie. I am created an application with the flowing login
requirement

if a user incorrectly enters a password, increment the amount of time before
the user is allowed to login again (start with 20 seconds, 60, 180,...) so
the first time someone incorrectly enters their password they wait for 20
seconds, second time 60, ….basically the waiting period triples with each
failed login.

this is what I have for user authentication :


if(!IsUser(UserName.Text,password.Text))
{
// error message
Page.RegisterClientScriptBlock("confirmation", "<script
language='javascript'>alert('Your username
and/or PassPhrase are incorrect. Please retry');</script>");

Response.Redirect("Login.aspx");
}

IsUser( ) authenticates users in the sql database and it works fine.

My problem is:
Since each failed login redirects to a new Login.aspx page, I cannot use a
local variable to hold the amount of time the next waiting period will be
before the user can attempt to login to the app. There has got to be a
simple way of holding this data.

thank you in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,139
Messages
2,570,806
Members
47,356
Latest member
Tommyhotly

Latest Threads

Top