Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
众所周知,当客户端和服务器之间没有连接时,将从 WCF 服务创建 Endpoint not found 异常,
我想只处理一次这个错误,并多次使用,而每个 WCF 服务没有多次尝试捕获,请帮助我
谢谢
将您的服务器调用包装在 Invoke 方法中并在那里处理错误:
public void Invoke(Action<T> call) { try { call(); } catch(EndpointNotFoundException exception) { // handle here } }