I have a WCF web service running under IIS with WebHttpBinding. It talks JSON. A sample method looks like this:
public OrderResponse Save(OrderRequest request) ...
So I am assuming that ASP.NET converts the JSON message into the OrderRequest object on the fly when it comes in.
I would like to save the incoming JSON message into a file. I thought that WCF tracing was the answer. I implemented the winning answer to the WCF Tracing question.
I added the following to my web.config to enable message logging.
<system.serviceModel>
<diagnostics>
<messageLogging
logEntireMessage="true"
logMalformedMessages="false"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="false"
maxMessagesToLog="3000"
maxSizeOfMessageToLog="2000"/>
</diagnostics>
</system.serviceModel>
So I do get the WCF trace file but it doesn't seem to contain the actual message despite logEntireMessage="true"
.
What am I missing?