none
how to make attempt login failed for user per no of try per period ? RRS feed

  • Question

  • problem

    how to make attempt login failed for user per no of try per period ?

    i work on asp.net core 2.2 web api 

    i need to write function on login http post make count to failed login attempt within period of time

    failed login within period  10 minutes the if it exceed it will redirect to url xxxx .

    [HttpPost(Contracts.ApiRoutes.Login.UserLogin)]
    public IActionResult PostUserLogins([FromBody]Users user)
    {
    
    if (isvalid)
    
    {
    
    }
    
    else
    
    {
    
    }
    
    }
    
    my function structure as above ?

    How to write function by c# return Boolean and tell me login exceed retry faild number login or not 

    and call


    • Moved by CoolDadTx Wednesday, September 4, 2019 1:47 PM ASP.NET related
    Wednesday, September 4, 2019 4:35 AM

All replies

  • Are you sure that you want to allow an attacker to lock the accounts by simply typing or sending incorrect passwords?

    I think that the number of attempts and time values can be stored in some Session[“somename”] variables. You can also use the database.

    By the way, ASP things can be also found here: https://forums.asp.net/.

    Wednesday, September 4, 2019 5:33 AM
  • Please post the ASP.NET questions you're asking in this forum over in the ASP.NET forums instead. They can better assist you.

    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, September 4, 2019 1:47 PM