[英]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 . 我在服务器上托管了WCF服务,但是每当互联网连接失败时,我都会收到错误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..! Erros是因为找不到服务器。 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类来解决此问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.