![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| 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 Specs![]() |
| | #2 (permalink) |
| 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 Specs![]() |
| | #3 (permalink) |
| 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 that worked as required. Best Regards, Sebastian |
My System Specs![]() |
| 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 | |||