Thanks for your repsonse Juvial.
I found it does have to do with Windows Forms context, Not running the
client on the UI thread is best answer for my situation as the reason I even
ran into this is laziness!
"Ido Samuelson" <firstname.lastname@example.org> wrote in message
> Sounds like a feature that I would need.
> Hello Juval,
> Best Regards,
> Ido Samuelson
> Senior consultant
> Advantech (Magen MTC)
>> If I understand your situation correctly, you have (as you should
>> have) a
>> deadlock. If the client is on the UI thread (actually, any thread that
>> the .NET 2.0 Windows Forms context, even if it does not pump messages
>> and you start a duplex session, then while you make a call to the
>> the service cannot call you back because that callback is converted to
>> Windows message, and you are not pumping messages because you are in
>> middle of a call-out.
>> You could do the following:
>> 1. Mark the callback operation as one-way
>> 2. Mark the callout as one-way (not possible usually)
>> 3. Not run the client on the UI thread
>> 4. Designate a different object as the callback (not 'this' for the
>> instance) and have that object communicate back to the client
>> 5. Wait for the next CTP (the WCF team can elaborate more if they want
>> - I
>> Hope that helps,
>> "Brent Dunham" <email@example.com> wrote in message
>>> Well, after no response I dug a little deeper, and discovered the
>>> issue. Turns out I couldn't consume a duplex service on the UI
>>> thread. I created a new thread after wrapping proxy instanciation and
>>> method invocation into a class. Has anyone ran into this? All samples
>>> I've seen on duplex are console based.
>>> "Brent Dunham" <firstname.lastname@example.org> wrote in message
>>>> I've written a simple duplex service but every call to service
>>>> results in
>>>> the exception
>>>> 'The session was closed before message transfer was complete'
>>>> I can't find any info on this message and it's got me stumped. The
>>>> callback method invocation happens AFTER the exception is caught
>>>> indicating that the callbacks happen on a different thread than
>>>> client code. If anyone has run into this or has knowledge ti would
>>>> VERY helpful.