tags:

views:

52

answers:

2

How can I get/build a log of login attemps in an ASP.NET site?

Is there a hook I can use in the Form Authentication configuration to get this automatically (as opposed to saving manually some record in a database?)

+1  A: 

In the websites I work on, this gets saved as part of the login code. If there is a "business logic layer" it goes there, else it goes in the data layer.

Tangurena
+3  A: 

You can use ASP.NET Health Monitoring, you can subscribe to WebAuthenticationSuccessAuditEvent and WebAuthenticationFailureAuditEvent.

  1. How To: Use Health Monitoring in ASP.NET 2.0
  2. FAQ - Health Monitoring in ASP.NET 2.0

If you need more help, let me know.

Mike Chaliy