简体   繁体   中英

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?

使用try and catch编辑了reference.cs页面,以获取服务的接收方法。

您可以通过放置适当的异常处理和Exception类来解决此问题

I guess you tried to connect the Windows phone 8 emulator to the localhost WCF service?

This won't work because the emulator is in a virtual machine but there are steps to fix it:

Take a look at this

For more

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM