When the ApplicationException
is sent to the client via FaultException<T>
without the InnerException
, then it is sent only as a string
. However, when the InnerException
is set, then the ApplicationException
itself is sent.
The Exception
type is serializable in .NET (it is often incorrectly cited as not being serializable), however, frequently the contents of the Data
property are not serializable. This will cause a serialization issue which is what I believe you are experiencing.
There are a few workarounds to this issue: You can set the Data
property to null
by using reflection or you can create your own class.