title: Locking out a user in an ASP .Net Custom Membership Provider
body: <p>I've had to create a custom membership provider for my current ASP .Net project in order to fit in with our database schema, and am having problems configuring it to lockout a user if they get their password wrong three times, as is supported by the standard providers.</p>
  
  <p>Is this something I need to implement myself, or should it be supported inherently?</p>
  
  <p>I have no code that specifically deals with it (and none of the interface members seem to deal with it specifically), but if I need to implement it myself, how do I go about informing the user they are locked out? Do I need to raise some sort of exception in ValidateUser?</p>
  
  <p><strong>Solution</strong></p>
  
  <p>Shame I can't mark two answers, the links provided by Dave R give a great in depth look at how membership works, and what Zhaph pointed out was just what I ended up doing, handling the locked out logic in the custom membership provider.</p>
  
  <p>I then handled the error condition by using the Login control's LoginError event and checked in there to see if the user was locked out in order to show the appropriate error message.</p>