I was throwing a simple WCF FaultException yesterday and came across the same problem as this on the forums
The client was trying to catch a fault as below:
{
To get it working from a server perspective I had to delcare the following:
I also marked the service interface with the following attribute:
[
I'm sure there must be a better way.... will followup
Hi,
What's wrong with the code you have in the post?
An
The FaultException is a specific type of exception that allows bubbling up fault information into the WCF stack so that it can be mapped it to a SOAP fault. The code I was using did not populate the FaultException with a FaultReason (hence the updated code)