Getting "on the wire" Size of Messages in WCF

Posted by Mystagogue on Stack Overflow See other posts from Stack Overflow or by Mystagogue
Published on 2010-05-25T23:38:04Z Indexed on 2010/05/25 23:41 UTC
Read the original article Hit count: 316

Filed under:
|

While I'm making SOAP or REST invocations to WCF, I'd like to have the channel stack on either end (client and server) record the on-the-wire size of the data received. So I'm guessing I need to add a custom behavior to the channel stack on either side. That is, on the server side I'd record the IP-header advertised size that was received. On the client side I'd record the IP-header advertised size that was returned from the server.

But this presupposes that this information is visible to a custom WCF behavior at the channel stack level. Perhaps it is only visible at the level of ASP.NET (at a layer beneath WCF)?

In short, does anyone have any further insight on if and how this information is accessible? I must qualify that this "size" data will be collected in a production environment, as part of regular business logic calls.

This question is related to my earlier bandwidth question.

© Stack Overflow or respective owner

Related posts about wcf

Related posts about Performance