Is there a built-in way to determine the size of a WCF response?

Posted by jaminto on Stack Overflow See other posts from Stack Overflow or by jaminto
Published on 2010-04-29T02:52:17Z Indexed on 2010/04/29 2:57 UTC
Read the original article Hit count: 265

Filed under:
|

Before a client gets the full payload of the web request, we'd like to first send it a measurement of the size of the response it will get. If the response will be too large, the client will present a message to the user giving them the option to abort the operation.

We can write some custom code to preload the response on the server, determine the size, and then pass it on to the client, but we'd rather not if there's another way to do it.

Does anyone know if WCF has any tricky way to do this? Or are there any free third party tools out there that will accomplish this?

Thanks.

© Stack Overflow or respective owner

Related posts about wcf

Related posts about preload