![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Deadlock issue when making multiple calls in WCF I have a scenario where I use a self-hosted service that uses NetTcpDuplexBinding. If my client app attempts to make a call to the service while a callback is coming in from the service, i get a deadlock issue. I thought that defining my service with ConcurrencyMode=Multiple would allow this, but its just not working that way. Here is the exact message I am getting: System.InvalidOperationException: This operation would deadlock because the reply cannot be received until the current Message completes processing. If you want to allow out-of-order message processing, specify ConcurrencyMode of Reentrant or Multiple on CallbackBehaviorAttribute. I also have a need to be able to make one call from the client while another is in progress, but I get this same issue. What can I do to allow this type of behavior? |
| | #2 (permalink) | ||||||||||||
| Guest | RE: Deadlock issue when making multiple calls in WCF Hi Jason, Did you try ConcurrencyMode=Rentrant instead of Multiple on the client side? Since that seems to be the attribute needed in your situation. "Jason Rodman" wrote:
| ||||||||||||
| | #3 (permalink) | ||||||||||||||||||||||||
| Guest | RE: Deadlock issue when making multiple calls in WCF Thanks for your reply Joe. From what I read about that mode, the service runs in single threaded mode, which wont work for my scenario. I need to be able to handle hundreds of concurrently connected users to the same service and be able to service their requests in parallell. If i change this, the service can only service one request at a time from what it sounds like. Am I understanding this right? "Joe-P" wrote:
| ||||||||||||||||||||||||
| | #4 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | RE: Deadlock issue when making multiple calls in WCF Hi Jason, Yeah you are right. Looks like you may want to use Asynchronous mechanism. My recommendation would be to create the Asynchronus mechanism on the service side therefore when the client makes the call it would seem its a synchronous call. This way you are technically putting the message into a queue depending on how many threads are available in the thread pool. If there are enough available then the operation would be similar to regular synchronus operation. Again, depending on your architecture you can have the client initiating or service initiating the asynchronous call but this is an option to prevent deadlock condition. To do it its easy and very little coding on your part. "Jason Rodman" wrote:
| ||||||||||||||||||||||||||||||||||||
| | #5 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | RE: Deadlock issue when making multiple calls in WCF Joes & Jason: What about changing the InstanceMode to "PerCall" instead of using the default? Would this take care of this issue? -- Stay Mobile "Joe-P" wrote:
| ||||||||||||||||||||||||||||||||||||
| |
| |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error making Video calls | Atlantan | Live Messenger | 0 | 04-06-2008 10:45 PM |
| Help! Reached a deadlock | Yakor | Vista security | 0 | 09-30-2007 07:24 PM |
| How does Vista make making telephone calls any easier ?? | Synapse Syndrome | Vista General | 0 | 01-30-2007 11:48 AM |