How to handle WCF exceptions (consolidated list with code)

前端 未结 4 778
名媛妹妹
名媛妹妹 2020-12-02 04:32

I\'m attempting to extend this answer on SO to make a WCF client retry on transient network failures and handle other situations that require a retry such as authentication

4条回答
  •  甜味超标
    2020-12-02 05:14

    we have a WCF client that deal with almost any type of failure at the server. The Catch list is very long but does not have to be. If you look closely, you will see that many exceptions are child definitions of the Exception Class (and a few other classes).

    Thus you can simplify things a lot if you want to. That said, here are some typical errors that we catch:

    Server timeout
    Server too busy
    Server unavailable.

提交回复
热议问题