WCF Blocking problem with mutiple clients!!

Posted by Marcel on Stack Overflow See other posts from Stack Overflow or by Marcel
Published on 2010-03-29T08:45:12Z Indexed on 2010/03/29 10:43 UTC
Read the original article Hit count: 369

Filed under:
|
|
|

Hi I seem to have a blocking issue with WCF.

Say I have two users and each have created their own instance of a class exposed on a WCF host using net.tcp with endpoint something like this "net.tcp://localhost:32000/SymHost/". The class is PerSession context and concurrency is reentrant. The class exposes two methods Alive() which return a bool of true straight away and an AliveWait which I inserted which does a Thread.Sleep for 4 seconds before returning true (testing purposes).

Now client 1 calls AliveWait() during which time he is blocked which is fair enough but then if client 2 makes a call to Alive() on its own instance he has to wait until client 1's call is returned - this behaviour is not what I would have expected? I would have expected client 2 to carry on as if nothing has happened or is this to do with the fact that they both share the same endpoint?

Can anyone explain what is going on and how I can make sure that client 2 can call its own instance uninterrupted?

Any help much appreciated!

© Stack Overflow or respective owner

Related posts about wcf

Related posts about net.tcp