password attempts

Discussion in 'ASP .Net' started by bbawa1@yahoo.com, Apr 20, 2007.

  1. Guest

    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
    , Apr 20, 2007
    #1
    1. Advertising

  2. The 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!
    *********************************************
    <> wrote in message
    news:...
    > 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
    >
    Cowboy \(Gregory A. Beamer\), Apr 21, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?aGRldg==?=
    Replies:
    0
    Views:
    282
    =?Utf-8?B?aGRldg==?=
    Oct 8, 2004
  2. ad
    Replies:
    1
    Views:
    1,375
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Dec 3, 2006
  3. Replies:
    1
    Views:
    577
    sloan
    Nov 18, 2008
  4. AAaron123
    Replies:
    2
    Views:
    2,090
    AAaron123
    Jan 16, 2009
  5. AAaron123
    Replies:
    1
    Views:
    1,310
    Oriane
    Jan 16, 2009
Loading...

Share This Page