| Subject: Knowing when a service dies |
| Group: microsoft.public.windows.developer.winfx.indigo |
| Date: 5/2/2008 7:40:46 AM |
| From: "sebastian.dau@googlemail.com" [Email Address Protection] |
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 |
| Back |
| Subject: Re: Knowing when a service dies |
| Group: microsoft.public.windows.developer.winfx.indigo |
| Date: 5/7/2008 2:51:02 AM |
| From: Nahid [Email Address Protection] |
hi, try following way YourServiceCF =3D new ChannelFactory<IYourService> (...........................); IYourService client =3D YourServiceCF .CreateChannel(); ((ICommunicationObject)client).Faulted +=3D new EventHandler(Faulted); or ((ICommunicationObject)client).Closed +=3D new EventHandler(Faulted); hope this help. thanks nahid http://nahidulkibria.blogspot.com/ On May 2, 8:40=A0pm, "sebastian....@googlemail.com" <sebastian....@googlemail.com> wrote: > 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 |
| Back |
| Subject: Re: Knowing when a service dies |
| Group: microsoft.public.windows.developer.winfx.indigo |
| Date: 5/25/2008 11:43:00 AM |
| From: "sebastian.dau@googlemail.com" [Email Address Protection] |
On May 7, 11:51 am, Nahid <nahid...@gmail.com> wrote: > 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....@googlemail.com" > > <sebastian....@googlemail.com> wrote: > > 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 Thanks, that worked as required. Best Regards, Sebastian |
| Back |