Last post Feb 01, 2017 07:38 AM by Chris Zhao
Jan 31, 2017 01:04 PM|nrk_hi|LINK
NetTcpBinding binding = TcpBindingUtility.CreateNetTcpBinding();
EndpointAddress endpoint = new EndpointAddress(@"net.tcp://localhost:8049/IService/");
Agent<IService> client = new Agent<IService>(CallBackInstance, binding, endpoint);
serviceInstance = client.ChannelFactory.CreateChannel();
serviceInstance.Register("TestSystem"); //service Call
Here before calling service method is there any way we can check if service channel is in faulted state . if service channel goes to faulted how to abort and recreat.
Feb 01, 2017 07:38 AM|Chris Zhao|LINK
before calling service method is there any way we can check if service channel is in faulted state
You could check service channel state like this.
if (proxy.State == CommunicationState.Faulted)
//"You have lost your connection to the service. Please make your request(s) again."
https://msdn.microsoft.com/en-us/library/ff183865.aspx (see section "Check for a Faulted Communcation Channel")