views:

155

answers:

0

I have found this example on http://www.codeproject.com/KB/WCF/WCFThrottling.aspx. My goal was to test multiple WS clients and i run into this issue.

My question have two parts, 1) I am just curious why it's not possible to call one webmethod in parallel on one static ProxyObject (when I do it works but it behaves as if it would be called one after another).

Code snippet: public static Proxy prox = new Proxy("ThrottleTCP");

...in asynchronous threadDelegate... : Console.WriteLine(prox.Ping());

Is it some kind of threadsafe mechanism? Creating new proxy each call solves the problem (WSs are called concurrently) code snippet: Console.WriteLine(new Proxy("ThrottleTCP").Ping());

2) How do you proceed when you want to answer 1st question? Look up MSDN somewhere? Or lookup some book? which one?