Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

Knowing when a service dies

 
 
Thread Tools Display Modes
Old 05-02-2008   #1 (permalink)
sebastian.dau
Guest


 

Knowing when a service dies

Hello Newsgroup,

I wonder how one would write wcf proxy code that is being notified
when the connected service channel is being closed (service process
ends for example).

I was subscribing the Channels and the Duplex Channels Closing and
Closed events but these have never been fired.

Any idea on that?

Thanks for you help!

Sebastian
Old 05-07-2008   #2 (permalink)
Nahid
Guest


 

Re: Knowing when a service dies

hi,
try following way

YourServiceCF = new ChannelFactory<IYourService>
(...........................);
IYourService client = YourServiceCF .CreateChannel();
((ICommunicationObject)client).Faulted += new
EventHandler(Faulted);
or
((ICommunicationObject)client).Closed += new
EventHandler(Faulted);

hope this help.
thanks
nahid
http://nahidulkibria.blogspot.com/


On May 2, 8:40*pm, "sebastian....@xxxxxx"
<sebastian....@xxxxxx> wrote:
Quote:

> Hello Newsgroup,
>
> I wonder how one would write wcf proxy code that is being notified
> when the connected service channel is being closed (service process
> ends for example).
>
> I was subscribing the Channels and the Duplex Channels Closing and
> Closed events but these have never been fired.
>
> Any idea on that?
>
> Thanks for you help!
>
> Sebastian
Old 05-25-2008   #3 (permalink)
sebastian.dau
Guest


 

Re: Knowing when a service dies

On May 7, 11:51 am, Nahid <nahid...@xxxxxx> wrote:
Quote:

> hi,
> try following way
>
> YourServiceCF = new ChannelFactory<IYourService>
> (...........................);
> IYourService client = YourServiceCF .CreateChannel();
> ((ICommunicationObject)client).Faulted += new
> EventHandler(Faulted);
> or
> ((ICommunicationObject)client).Closed += new
> EventHandler(Faulted);
>
> hope this help.
> thanks
> nahidhttp://nahidulkibria.blogspot.com/
>
> On May 2, 8:40 pm, "sebastian....@xxxxxx"
>
> <sebastian....@xxxxxx> wrote:
Quote:

> > Hello Newsgroup,
>
Quote:

> > I wonder how one would write wcf proxy code that is being notified
> > when the connected service channel is being closed (service process
> > ends for example).
>
Quote:

> > I was subscribing the Channels and the Duplex Channels Closing and
> > Closed events but these have never been fired.
>
Quote:

> > Any idea on that?
>
Quote:

> > Thanks for you help!
>
Quote:

> > Sebastian
Thanks,

that worked as required.

Best Regards, Sebastian
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer dies Viv Vista hardware & devices 5 4 Weeks Ago 12:01 PM
Knowing when a WCF service dies... sebastian.dau .NET General 0 05-03-2008 03:24 AM
wmplayer dies not unload keepout Vista General 14 12-21-2007 03:32 AM
wmp sharing dies after 5-10 songs EdB Vista music pictures video 0 12-06-2006 12:03 AM
Knowing version installed Jaisol Vista General 5 10-14-2006 08:00 AM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50