Search code examples
c#wcfwindows-phone-7windows-phone-8service-reference

How to Handle Service Reference Errors?


I have a WCF service hosted on a server, but whenever internet connection fails i'm getting error System.ServiceModel.CommunicationException. Even though I tried to handle that in completed method, error pops up in Reference Page Method.

Erros is because of Server is not found..! But there should be a way to handle this..!

How do I restrict and handle this error? Otherwise I have to remove Services..! Is There any Other way to do or handle this?


Solution

  • edited the reference.cs page with try and catch for the receiving method of service.