Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. block the user after 3 attempts

block the user after 3 attempts

Scheduled Pinned Locked Moved ASP.NET
saleshelp
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jithbiz0033
    wrote on last edited by
    #1

    Hi Guys, I want to block the customer from logging in after 3 continuous attempts.I would like to block them for some duration(eg. 6 hours) so that they will not be able to login during that time period and afterwards the block is released. If anybody have coding or suggestion for my problem. please do reply. Thanks Jith

    E P D 3 Replies Last reply
    0
    • J jithbiz0033

      Hi Guys, I want to block the customer from logging in after 3 continuous attempts.I would like to block them for some duration(eg. 6 hours) so that they will not be able to login during that time period and afterwards the block is released. If anybody have coding or suggestion for my problem. please do reply. Thanks Jith

      E Offline
      E Offline
      eyeseetee
      wrote on last edited by
      #2

      you could set a string value to count number of times user has attempted and match against current date. Then have if statement along lines of if string value is = 3 and date = current date then error message = You have been restricted for 3 hours etc

      P 1 Reply Last reply
      0
      • E eyeseetee

        you could set a string value to count number of times user has attempted and match against current date. Then have if statement along lines of if string value is = 3 and date = current date then error message = You have been restricted for 3 hours etc

        P Offline
        P Offline
        Paddy Boyd
        wrote on last edited by
        #3

        Why a string value specifically?

        1 Reply Last reply
        0
        • J jithbiz0033

          Hi Guys, I want to block the customer from logging in after 3 continuous attempts.I would like to block them for some duration(eg. 6 hours) so that they will not be able to login during that time period and afterwards the block is released. If anybody have coding or suggestion for my problem. please do reply. Thanks Jith

          P Offline
          P Offline
          Paddy Boyd
          wrote on last edited by
          #4

          Add a couple of fields to your user table in the DB, e.g. NUMBER_FAILED_ATTEMPTS & DATE_OF_LAST_LOGIN. You can then code to increment the number on a failed login attempt and then check if you are blocked where number > 3 and date within 6 hours.

          E D 2 Replies Last reply
          0
          • J jithbiz0033

            Hi Guys, I want to block the customer from logging in after 3 continuous attempts.I would like to block them for some duration(eg. 6 hours) so that they will not be able to login during that time period and afterwards the block is released. If anybody have coding or suggestion for my problem. please do reply. Thanks Jith

            D Offline
            D Offline
            Declan Bright
            wrote on last edited by
            #5

            Insert all login attempts to a database table which contains username, datetime and login success. As part of the authentication process do a select count for the username where the login success is false for a given time period. If the count is greater than 2 then reject the login and display a nice informative message.

            Declan Bright www.declanbright.com

            1 Reply Last reply
            0
            • P Paddy Boyd

              Add a couple of fields to your user table in the DB, e.g. NUMBER_FAILED_ATTEMPTS & DATE_OF_LAST_LOGIN. You can then code to increment the number on a failed login attempt and then check if you are blocked where number > 3 and date within 6 hours.

              E Offline
              E Offline
              eyeseetee
              wrote on last edited by
              #6

              Yes much better suggestion, a database table is probably more secure to display this info, you could also set it up to clear the fields after 6 hours

              1 Reply Last reply
              0
              • P Paddy Boyd

                Add a couple of fields to your user table in the DB, e.g. NUMBER_FAILED_ATTEMPTS & DATE_OF_LAST_LOGIN. You can then code to increment the number on a failed login attempt and then check if you are blocked where number > 3 and date within 6 hours.

                D Offline
                D Offline
                Declan Bright
                wrote on last edited by
                #7

                Hi Paddy I'm getting paranoid, as a fellow irish man I'm afraid you are looking over my shoulder. ;P

                Declan Bright www.declanbright.com

                P 1 Reply Last reply
                0
                • D Declan Bright

                  Hi Paddy I'm getting paranoid, as a fellow irish man I'm afraid you are looking over my shoulder. ;P

                  Declan Bright www.declanbright.com

                  P Offline
                  P Offline
                  Paddy Boyd
                  wrote on last edited by
                  #8

                  I am. Don't look round.

                  D 1 Reply Last reply
                  0
                  • P Paddy Boyd

                    I am. Don't look round.

                    D Offline
                    D Offline
                    Declan Bright
                    wrote on last edited by
                    #9

                    :omg: :wtf: :omg: :wtf: :omg:

                    Declan Bright www.declanbright.com

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups