type password it checks three times weather my username and password
is correct or not. After 3 failed attempts it gives me message that
Notify your administrator.
I used form Authnication. How can I count weather user attempts 3
times. My username and password is stored in databaseThe easiest way is to set up a session variable and increment:
if(failedLogin)
Session("failedAttempts") = int.Parse(Session("FailedAttempts")) + 1;
You can then disable the account in the database when this hits three and
any time they try to log in after that kicks them.
A more full method is to have failed attempts in the database and increment
each time they fail, reset to 0 if succesful. If you like this model, the
easiest way to get it is to use the ASP.NET built in membership model. It
automatically does this for you.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
*********************************************
Think outside the box!
*********************************************
<bbawa1@.yahoo.comwrote in message
news:1177104579.742843.13100@.q75g2000hsh.googlegro ups.com...
Quote:
Originally Posted by
have a username and opassword text boxes and one login button. When I
type password it checks three times weather my username and password
is correct or not. After 3 failed attempts it gives me message that
Notify your administrator.
>
I used form Authnication. How can I count weather user attempts 3
times. My username and password is stored in database
>
0 comments:
Post a Comment