Author: gavinuk | Posted on: 8/31/2008 2:21:23 PM | Views : 349

The Web Application is successfully running, and as a security measure it's logging each successful login in an SQL table, with IP address of the client etc.

I'm trying to take this one step further, so that it also logs failed attempts at Logging in. Due to the setup of my Log Table (which has a foreign key for UserId) each entry must be specifically for a user in the database. This means I wont be able to log failed attempts for unknown usernames, but thats fine. I would just like to detect if Authentication fails, if the reason is "wrong password" and if so, fire my SQL query to log this in the table, for whoever has incorrectly entered their password.

 Is this possible? I seem to be able to detect if the authentication failed or not, but no reason as to why:

1        Protected Sub LogIn_Authenticate(ByVal sender As Object ...

Go to the complete details ...