View Single Post
Old 05-07-2008   #2 (permalink)
Nahid


 
 

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