Tuesday, May 13, 2008

WCF friction

Today I spent some time (thank God no more than 15 minutes) tracking down a WCF issue from hell. Every time I made a call to the service I got the following exception:

System.ServiceModel.CommunicationException : The underlying connection was closed: The connection was closed unexpectedly.

This is really helpful, isn't it? Fortunately there is some tool that helped me out a great deal: Service Trace Viewer Tool (SvcTraceViewer.exe). Turns out that I forgot to place a DataContract attribute on one of my DTO objects.

Why am I too stupid to deduce this from the exception message in the first place?

1 comment:

Frederik Gheysels said...

Maybe 'cause the Exception Message was stupid ? :P