January 13, 2019

WCF Test Client - How to increase MaxReceivedMessageSize

The WCF Test Client shipped with Visual Studio, is useful tool to quickly test and check results for a WCF Service call. However I encounter a scenario where my service call is returning larger result-set that is exceeding the default message size of 65536, and it starts giving me this error message.

The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.

In the last post Increase message size quota for incoming messages, we have seen how to increase the message size from client application's config file. But you might facing problem in searching for a way to configure message size for WCF Test Client when calling a service method. There is an option available to configure message size from WCF Test Client, but it seems to be slightly hidden, because this is not at very prominent place where user can find it easily.

After you Add Service in WCF Test Client, you can find there is a Config File node at the end of the service tree. Right click on Config File node, and select Edit with ScvConfigEditor from the context menu.

Edit with ScvConfigEditor

You will get the configuration editor dialog, just go to the Bindings node, expand it, and select the required binding settings. Here you can change the MaxReceivedMessageSize or any other settings you may need.

Edit with ScvConfigEditor Bidings

No comments:

Post a Comment