469,964 Members | 1,597 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,964 developers. It's quick & easy.

Using LoginError with C# & .NET


I am successfully trapping log-in errors in my application BUT, I want
to know what KIND of login error it is. I specifically want to trap
Incorrect Password errors to watch for possible intrusion attempts.

I am using the System.Web.UI.WebControls.Login component and have the
LoginError event going to method linMain_LoginError. Execution
successfully goes there but how do I determine whether it is there due
to an Incorrect Password?


Ken Linder

Nov 17 '05 #1
1 2184
After a cup of coffee and a short conversation with our resident
c++/Microsoft expert I continued searching & discovered the following


The solution is a little more obscure & a little less obvious that I
was hoping, but it will do. If anyone has a more elegant solution,
PLEASE post it. Here's what I want to do in sort-of pseudo-code...

// in the linMain_LoginError method - bound to the LoginError event

if (isUserLocked)
if (OKToUnlockNow)
{ UnlockAndContinue() }
if (incorrectPassword)
incorrectPasswordCount ++
if (incorrectPasswordCount >= badPasswordLimit)

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by - Dazed | last post: by
1 post views Thread by BLAdeMAN | last post: by
3 posts views Thread by Nathan Sokalski | last post: by
3 posts views Thread by Fred Chateau | last post: by
George Lft
1 post views Thread by George Lft | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.