wcf-faults

WCF fault handling

给你一囗甜甜゛ 提交于 2019-12-12 11:41:13
问题 Q How can I get the original exception (occurred on the server) on the client side? I am working with a self-hosted WCF service and C# 4 and trying to set up proper exception handling. I have a client that looks like this private ServiceResponse PerformRemoteAction(ServiceRequest request, ProcessOperations operation) { ... try { //remote call switch (operation) { ... case ProcessOperations.VerifyAction: { response = client.VerifyAction(request); break; } default: throw new

How to trace WCF serialization issues / exceptions

末鹿安然 提交于 2019-12-01 03:44:18
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

How to trace WCF serialization issues / exceptions

你说的曾经没有我的故事 提交于 2019-12-01 00:25:56
问题 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