Vishal I Patil Vishal I Patil - 24 days ago 8
C# Question

maxReceivedMessageSize and maxBufferSize in app.config

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

Answer

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>