?
Solved

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

Posted on 2013-06-04
1
Medium Priority
?
1,944 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

765 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