Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy isn't my invalid WCF message being logged?
    primarykey
    data
    text
    <p>I've got a WCF client communicating with a WCF service using <code>[DataContract]</code> types, and I'm getting a serialization error:</p> <blockquote> <p>The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter <a href="http://www.example.com/2007/09/Example:ExampleResult" rel="nofollow">http://www.example.com/2007/09/Example:ExampleResult</a>. The InnerException message was 'Deserialized object with reference id 'i3' not found in stream.'. Please see InnerException for more details.</p> </blockquote> <p>Normally, I'd simply crank up the tracing and see exactly what happened, but in this case, I can't get the offending (response) message to appear in the log.</p> <p>My configuration looks like this:</p> <pre><code>&lt;system.serviceModel&gt; ... (more stuff) &lt;diagnostics&gt; &lt;messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="true" maxMessagesToLog="10000" maxSizeOfMessageToLog="81920000" /&gt; &lt;/diagnostics&gt; &lt;/system.serviceModel&gt; &lt;system.diagnostics&gt; &lt;trace autoflush="true" /&gt; &lt;sources&gt; &lt;source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true"&gt; &lt;listeners&gt; &lt;add name="wcf_listener" /&gt; &lt;/listeners&gt; &lt;/source&gt; &lt;source name="System.ServiceModel.MessageLogging"&gt; &lt;listeners&gt; &lt;add name="wcf_listener" /&gt; &lt;/listeners&gt; &lt;/source&gt; &lt;/sources&gt; &lt;sharedListeners&gt; &lt;add name="wcf_listener" initializeData="tracelog.svclog" type="System.Diagnostics.XmlWriterTraceListener" /&gt; &lt;/sharedListeners&gt; &lt;/system.diagnostics&gt; </code></pre> <p>In the resulting log file, I get the outbound message logged, and then the exception logged. I never see the incoming message. What am I doing wrong here?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload