1

As we know , when there was no connection between client and server, the Endpoint not found Exception will be created from WCF services ,

I d like to handle this error just one time and uses several times without several try catches for each WCF services please help me

Thanks

1 Answers1

1

Wrap your server call in an Invoke method and handle the error there:

 public void Invoke(Action<T> call)
 {
    try
    {
       call();
    }
    catch(EndpointNotFoundException exception)
    {
    // handle here
    }
}
flayn
  • 5,272
  • 4
  • 48
  • 69