Solved

ASP.Net MVC 4 C# -- LockOut after failed attempts

Posted on 2013-06-04
1
1,805 Views
Last Modified: 2013-07-02
How can I update my webpages_Membership database table/etc so below #5 displays Account is locked error instead of allowing user to login ?
-----------------------------------------------------------------------------------------------------
1.      add below to \Controllers\AccountController.cs
            if(WebSecurity.IsAccountLockedOut(model.UserName,6,10000))
            {
                    ModelState.AddModelError("", "Account is locked.");
                    //return RedirectToAction("LockedAccount");
                    return View(model);
            }
2.      run APP
3.      login with incorrect password
4.      displays Account is locked error message which is GOOD
5.      login with correct password this time
0
Comment
Question by:finance_teacher
1 Comment
 

Accepted Solution

by:
finance_teacher earned 0 total points
ID: 39257647
Please reply.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now