Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista Tutorial - Knowing when a service dies

 
 
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

My System SpecsSystem Spec
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
My System SpecsSystem Spec
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
My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
NIC dies under heavy load Vista networking & sharing
How can I change IP Adapters WITHOUT knowing exactly what thedescription is? VB Script
Computer dies Vista hardware & devices
Knowing when a WCF service dies... .NET General
Knowing version installed Vista General


Vista Forums 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 Ltd

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