c# - IIS Queuing Requests? -
i’ve created windows 10 universal app using mvvmcross , stephen cleary’s excellent asyncex library.
update 27/10/2015 15:43 - stephen has answered question. tested , proven correct.
in view, bind listview property in viewmodel asynchronously loads collection of place holder view models called assignabletaskplaceholderviewmodel (using asyncex functionality).
the data comes web api service i’ve created. test harness, collection loaded 12 assignabletaskplaceholderviewmodel each holding id value.
the datatemplate listview items binds elements property on assignabletaskplaceholderviewmodel called assignabletaskviewmodel. asynchronously calls web api method return detailed data (again using asyncex functionality). method returning mock data.
when run app, expect see:
1) initial loading of placeholder collection taking small amount of time, then
2) detailed data each item in list loaded concurrently, taking same amount of time data load.
what see detailed data being loaded sequentially i.e. looks iis queuing requests, processing them 1 @ time.
shown below debug data, shows initial requests processed within second, responses taking between 0 , 4 seconds complete, though each method call doing same thing.
my question is: why occurring?
start task id 1050100111000000000034373 @ 20/10/2015 15:09:52
start task id 1050100111000000000034398 @ 20/10/2015 15:09:52
start task id 1050100111000000000034402 @ 20/10/2015 15:09:52
start task id 1050100111000000000034407 @ 20/10/2015 15:09:52
start task id 1050100111000000000034431 @ 20/10/2015 15:09:53
start task id 1050100111000000000034433 @ 20/10/2015 15:09:53
start task id 1050100111000000000034454 @ 20/10/2015 15:09:53
start task id 1050100111000000000034479 @ 20/10/2015 15:09:53
start task id 1050100111000000000034483 @ 20/10/2015 15:09:53
start task id 1050100111000000000034488 @ 20/10/2015 15:09:53
start task id 1050100111000000000034512 @ 20/10/2015 15:09:53
end task id 1050100111000000000034373 @ 20/10/2015 15:09:53
start task id 1050100111000000000034514 @ 20/10/2015 15:09:53
end task id 1050100111000000000034512 @ 20/10/2015 15:09:53
end task id 1050100111000000000034514 @ 20/10/2015 15:09:53
end task id 1050100111000000000034402 @ 20/10/2015 15:09:53
end task id 1050100111000000000034407 @ 20/10/2015 15:09:54
end task id 1050100111000000000034398 @ 20/10/2015 15:09:54
end task id 1050100111000000000034483 @ 20/10/2015 15:09:55
end task id 1050100111000000000034479 @ 20/10/2015 15:09:55
end task id 1050100111000000000034488 @ 20/10/2015 15:09:56
end task id 1050100111000000000034454 @ 20/10/2015 15:09:56
end task id 1050100111000000000034433 @ 20/10/2015 15:09:57
end task id 1050100111000000000034431 @ 20/10/2015 15:09:57
if use fake data (rather calling web api methods @ all), deliberately added delay can see view/viewmodel/asyncex plumbing working fine.
more details:
1) i’m calling web api using windows.web.http.httpclient. use single instance of httpclient web api method calls (which believe best practice).
2) web api method calls not require authentication or https connection.
3) httpbaseprotocolfilter (used httpclient) i’ve set maxconnectionsperserver 100.
4) web api project targets .net 4.6 (targetframework="4.6"). believe version of .net doesn’t limit number of connections server i.e. no need add web.config: .
5) i’ve used async/await “all way”, in both client app , web api methods.
6) session enabled in web api project.
7) i'm running iis 10 on win 10 development pc.
if read/write session mode enabled, asp.net serialize requests. asp.net regardless of whether they're synchronous or asynchronous.
Comments
Post a Comment