Answer the question
In order to leave comments, you need to log in
ServiceModel.ClientBase needs to check the connection. Is there a way?
ServiceModel.ClientBase<TChannel>
you need to check the connection.
Checked so: State != CommunicationState.Opened
But at first there is an exception, and only then the State changes.
There is an option to make an empty method on the server and always pull it, but maybe there is some kind of built-in solution?
Answer the question
In order to leave comments, you need to log in
Maybe the problem is that you need to check the state as a bit mask (like flags) or check for a different status?
if ((_service.State & CommunicationState.Faulted) == CommunicationState.Faulted)
{
// ...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question