Why Use SOAP Faults Instead of .NET Exceptions in WCF?
Exceptions come with a number of limitations and potential security risks:
- they are platform- and technology-specific;
- exceptions can create tight coupling between clients and the service (clients have to know which exceptions each operation may throw);
- exceptions can reveal details of the service's implementation to clients;
- exceptions can leak private and personal information;
- exceptions and exception hierarchies are hard to represent in metadata.
That's why exceptions on the service side need to be mapped to their equivalents on the client.
This is easy to do with SOAP Faults. What makes it especially interesting is that the exceptions WCF clients receive are represented as FaultException.
Only registered users can leave a comment.
Sign in or register to leave a comment.