I'm getting the following error from my WCF service which is returning the results of a query in C# objects.
The maximum message size quota for incoming messages (131072) has been exceeded
I know how to resolve this via MaxReceivedMessageSize What I'm looking to find out is how do I find out what contributes to the message size. It dosn't look to me like it can be purely data e.g. If I add 5Kb of data to the amount of data I am pulling back from my service. I need to increase MaxReceivedMessageSize by more than 5KB in order to resolve the error.
I'm also wondering about any tools to look at the message size in the debugger. When I step through my code to the point where my WCF service is called, I cant seem to get any info on the message size etc
And finally how to trim/optimise the message size!