Problem
I have this strange problem. I am hosting a WCF server in a console app: Console.WriteLine("Press 'q' to quit.");
var serviceHost = new ServiceHost(typeof(MessageService));
serviceHost.Open();
while (Console.ReadKey().KeyChar != 'q')
{
}
serviceHost.Close();
it exposes two endpoint for publish and subscribe (duplex binding) When I stop or exit the console app, I never receive channel faulted at the client end. I would like client to be informed is server is down. Any idea what is going wrong here?
All I want is either of the following event to be raised when console app goes down:
msgsvc.InnerDuplexChannel.Faulted += InnerDuplexChannelOnFaulted;
msgsvc.InnerChannel.Faulted += InnerChannelOnFaulted;