maxReceivedMessageSize and maxBufferSize in app.config

Vishal I P picture Vishal I P · Feb 21, 2013 · Viewed 120.6k times · Source

How to increase maxReceivedMessageSize and maxBufferSize parameters in app.config file to 2000000 before running the application.

Answer

mattytommo picture mattytommo · Feb 21, 2013

You need to do that on your binding, but you'll need to do it on both Client and Server. Something like:

<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding maxBufferSize="64000000" maxReceivedMessageSize="64000000" />
        </basicHttpBinding>
    </bindings>
</system.serviceModel>