locked
WCF TCP Callback halt RRS feed

  • Question

  • Hello.

    I'm just writing my first WCF Callback model program.

    I create same interface in server side and client side.

    I create a server class and started with Reentrant (ConcurrencyMode) and PreSession(InstanceContextMode).

    I need server to call a client method in the method called by client written in server. Server get the callback channel with no error. But die in calling the method in callback object, with no error, no return, no more information.

    What's wrong?

    ----

    I tried to use Multiple (ConcurrencyMode) but no change.
    • Edited by EternalSnow Thursday, August 28, 2008 8:08 AM more info
    Thursday, August 28, 2008 7:35 AM

Answers

  • OK. I fix it my self.

    While using DuplexClientBase class, method "Open" should be called in a free thread, not in main thread of windows form.
    Eternal Snow
    • Marked as answer by EternalSnow Friday, August 29, 2008 5:28 PM
    Friday, August 29, 2008 5:28 PM

All replies

  • I've tried both add service to "Service References" and write a class to inherit DuplexClientBase in client. All are failed.

    Yes, I see lots of examples. Demo works well. But all of them use a OneWay mark before method declaration. I cannot use OneWay message because I need the returned information of my callback funtion.
    • Edited by EternalSnow Thursday, August 28, 2008 9:56 AM Add some info
    Thursday, August 28, 2008 9:54 AM
  • OK. I fix it my self.

    While using DuplexClientBase class, method "Open" should be called in a free thread, not in main thread of windows form.
    Eternal Snow
    • Marked as answer by EternalSnow Friday, August 29, 2008 5:28 PM
    Friday, August 29, 2008 5:28 PM