If an exception occurs in my WCF service, what is the best way to communicate that error to the client?
Should I log it on the service and rethrow a soap exception? Or should I log it and return a user friendly message?
Using strongly typed or non-typed FaultException is a way to accomplish this. There is an excellent article Simplifying WCF: Using Exceptions as Faults that describes how to use each. As the article points out, depending on complexity of your service you may opt to choose simpler untyped FaultException and pass exception info to the client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With