By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,311 Members | 1,928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,311 IT Pros & Developers. It's quick & easy.

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

P: n/a

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 ?




Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Ford Prefect alias Armin" <Ar***@humsoft.com> wrote in message
news:bq*************@news.t-online.com...

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 ?




Nov 18 '05 #2

P: n/a

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))

you were assigned to the same thread?
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)

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> schrieb im Newsbeitrag
news:eU**************@TK2MSFTNGP12.phx.gbl...
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.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Ford Prefect alias Armin" <Ar***@humsoft.com> wrote in message
news:bq*************@news.t-online.com...

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 ?





Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.