How to trace WCF serialization issues / exceptions
Posted
by Fabiano
on Stack Overflow
See other posts from Stack Overflow
or by Fabiano
Published on 2010-05-06T08:55:15Z
Indexed on
2010/05/06
8:58 UTC
Read the original article
Hit count: 1020
Hi
I occasionally run into the problem that an application exception is thrown during the WCF-serialization (after returning a DataContract from my OperationContract). The only (and less meaningfull) message I get is
System.ServiceModel.CommunicationException : The underlying connection was closed: The connection was closed unexpectedly.
without any insight to the inner exception, which makes it really hard to find out what caused the error during serialization.
Does someone know a good way how you can trace, log and debug these exceptions? Or even better can I catch the exception, handle them and send a defined FaulMessage to the client?
thank you
© Stack Overflow or respective owner