c# - call to WCF from multiple threads returns properties with null value sometimes -


i call wcf service multiple threads @ same time, response comes empty. if have 10 threads working in parallel calling service, 1 returs data, rest of them return properties null value. service consumed project in same solution in vs. service refference obtained discovery(so service not hosted in iis).

why think behaviour? if allow 1 thread @ time with:

 mylist.asparallel().withdegreeofparallelism(1).forall(x => worker(x)); 

all fine, need @ least 5 speed things up. worker method calls wcf service.

 public void worker(object cui)     {          mydata mf = null;         mf = (new analyseservice.analyseserviceclient()).getdatafromwcfservice((string)cui, true);     } 

on server response correct, when reaches client may have it's properties equl null

it turned out vs having problems this.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -