asp.net

Hello Sir,

I have created login page in asp.net and if the user fails to login 3 times,then his account should be locked out.  I am having custom table and custom membership provider for valiating users in place. Can you please tell me how to implement this?.  

Sickandar
sickandarmAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jjardineCommented:
You might try storing the number of login attempts in the viewstate or session state.  Then everytime they attempt to log in and it failed the count would increase.  WHen it gets to your threshold lock them out in the database by setting a flag in the table.  

You could also just create a failedLoginAttempts field in the table as well.   Every time they fail an attempt, increment the counter.  If they log in successfully, set the failedLoginAttempts back to 0.
0
Rupesh PCommented:
Storing the number of attempts in the viewstate or session won't be a good idea , a user can then exit the application and try again again without restriction.

Storing the value in the table field is a nice idea.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.