WCF Message Debugging on Custom Binding

Posted by Programming Hero on Stack Overflow See other posts from Stack Overflow or by Programming Hero
Published on 2010-04-26T20:25:39Z Indexed on 2010/04/27 9:13 UTC
Read the original article Hit count: 554

Filed under:
|
|

I've created a custom binding in WCF for a custom MessageEncoder to allow messages to be written as XML using a wider range of encodings than WCF supports out of the box. The encoder appears to be working and I am able to send and receive messages, but I want to verify that the XML message being written is exactly as required by the service I am trying to consume.

I've turned on message logging for WCF using the diagnostic trace listeners to output the messages sent and received over the wire to a log file. Unfortunately, for calls using my encoder, the message is displayed as ... stream ...

EDIT: I don't think it's anything to do with my custom encoding. I have experimented with my custom binding a little, switching to using the built-in text encoding and http transport. I still don't get a message body logged in the message trace.

Is there anything that needs to be specified within a custom binding to enable message logging?

© Stack Overflow or respective owner

Related posts about wcf

Related posts about debugging