How can I catch exceptions in WPF when calling a WCF Service?
Asked
Active
Viewed 612 times
2 Answers
3
Basically you'll have three approaches:
- Rethrow
FaultExceptionon your regular try/catch - Mark your
OperationContractwithFaultContractattribute and translate your Exception to your custom Fault object, manually - To implement a
IErrorHandlerbehavior and let it handle WCF exceptions to you
This link can explain these options: Simplifying WCF: Using Exceptions as Faults
Rubens Farias
- 55,782
- 8
- 132
- 160
0
I think this has already been covered by this question on stack overflow. WPF Exceptions
Bob.
Community
- 1
- 1
scope_creep
- 4,143
- 11
- 34
- 63