Can't make two request at once, one blocks all.....

  • Thread starter Thread starter Ford Prefect alias Armin
  • Start date Start date
F

Ford Prefect alias Armin

Hello

I have a Problem of understanding how IIS/ASPX Works.....

Why can't to request run at the "same" time ??

I have a Simple ASPX Web Application.

It has two Button.

Button 1 startst a do loop for 15 Seconds
Button 2 simply says Hello (writing hello in a Label)


I start Browser 1 and call the aspx Site
I start Browser 2 and call the aspx Site

Now in Browser 1 I click Button 1 (the loop)
Next in Browser 2 I click Button 2.

Browser 2 now waits till Browser 2 has ended the 15 Seconds Loop
and then start the Hello.

So Browser 2 is blocked untill Browser 1 is finished.........


Does that mean that ASPX is unable to server two Clients at once ?

What if 10.000 User call the Site ? Then Every User is blocked if only one
uses the "Loop" Button ?
 
I don't know all of the details of the process, but the aspnet_wp process
does spawn multiple worker threads to service requests - in fact, you can
specify the maximum number of threads to spawn in your config file. If you
are using a busy wait for your 15 second delay, then you could be spinning
up your CPU to 100% and blocking that way, or it could be that, since you
are on the same machine, you were assigned to the same thread? Either way,
using a do loop and making your code just spin out of control instead of
putting that thread to sleep and letting the scheduler assign that time to
another thread or process isn't particularly good design.
 
Thanx !

You are right :-)

if I replace the do loop and let the Thread sleep, it works.....

System.Threading.Thread.CurrentThread.Sleep(New TimeSpan(0, 0, 20))


If I start the two Browserwindows from a third Window
then (even with the Thread.sleep and no do loop) it doesn't work (blocked)
 
Back
Top