![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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 | Re: 'The session was closed before message transfer was complete' in duplex service 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! ![]() thanks, Brent "Ido Samuelson" <idos@magen.com> wrote in message news:3e64290452513c8c7de5674d98e14@news.microsoft.com... > Sounds like a feature that I would need. > Hello Juval, > > > Best Regards, > > Ido Samuelson > Senior consultant > Advantech (Magen MTC) > mailto:idos@magen.com > >> 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 >> has >> the .NET 2.0 Windows Forms context, even if it does not pump messages >> yet), >> and you start a duplex session, then while you make a call to the >> service, >> the service cannot call you back because that callback is converted to >> a >> Windows message, and you are not pumping messages because you are in >> the >> 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 >> callback >> instance) and have that object communicate back to the client >> asynchronously >> 5. Wait for the next CTP (the WCF team can elaborate more if they want >> - I >> cannot). >> Hope that helps, >> >> Juval. >> >> "Brent Dunham" <bdunham@conexis.com> wrote in message >> news:umu3hGWDGHA.1032@TK2MSFTNGP11.phx.gbl... >> >>> 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" <bdunham@conexis.com> wrote in message >>> news:OKJn6JADGHA.2436@TK2MSFTNGP15.phx.gbl... >>> >>>> Hi, >>>> 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 >>>> 1st >>>> callback method invocation happens AFTER the exception is caught >>>> indicating that the callbacks happen on a different thread than >>>> service >>>> client code. If anyone has run into this or has knowledge ti would >>>> be >>>> VERY helpful. >>>> thanks, >>>> Brent > > |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Terminal Service session slow on Vista for just one server | Hassan | Vista General | 8 | 11-24-2007 06:47 AM |
| HP6980 will not Automatically do Duplex with Duplex Hardware | Dave | Vista print fax & scan | 1 | 07-07-2007 05:20 PM |
| Vista service - session 0 isolation | Gene Vangampelaere | Vista security | 2 | 04-18-2007 02:20 PM |
| Vista service - session 0 isolation | Gene Vangampelaere | Vista General | 4 | 04-17-2007 09:31 AM |