Delay without blocking CPU

A

A.M

Hi,

I my web application, I wnat the application have 10 seconds delay upon any
invalid login.
What would be the best way to have 10 second delay without blocking and
using CPU time? Probably having a loop is not a good ida.

Thanks,
Alan
 
A

A.M

I can't do that. It must be at server side because the delay is because of
security so no automated try/error remote program can try to find a
password.
 
K

Kevin Spencer

Just to clarify, the Thread.Sleep() method takes an integer that indicates
the number of milliseconds to sleep for. It is overloaded to take a TimeSpan
instead as well.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
J

Joe Fallon

Use Thread.Sleep and set the amount of time (like 3 seconds).

If you count the number of failed log ins you can multiply the delay time by
that value.
This makes the site respond proportionally slower upon each failed login.
Other users can log-in while the attacker is being delayed.

Also, consider implementing CAPTCHA functionality.
It really isn't that hard and is an even better strategy for defeating
automated programs.
 
M

[MSFT]

Hi Alan,

CAPTCHA stands for "completely automated public Turing test to tell
computers and humans apart." What it means is, a program that can tell
humans from machines using some type of generated test. A test most people
can easily pass but a computer program cannot.

Luke
 
A

A.M

Thanks for information.

I am very interested to that concept. Can you refer me to some links? I
already searched Google, It came up with some abstracts concepts.

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top