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 reco开发者_如何学Crd in a database?)
You can use ASP.NET Health Monitoring, you can subscribe to WebAuthenticationSuccessAuditEvent and WebAuthenticationFailureAuditEvent.
- How To: Use Health Monitoring in ASP.NET 2.0
- FAQ - Health Monitoring in ASP.NET 2.0
If you need more help, let me know.
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.
精彩评论