How to Post Large Data To WCF Service RRS feed

  • Question

  • User-1660409334 posted

    Hi All,

    I am getting issues, when i post large data to wcf service then getting "the remote server returned an error (400) bad request in wcf".

    On Binding, i have already defined maxReceivedMessageSize="2147483647" and maxBufferSize="2147483647".

    Please help me, how to post large data to wcf service method.



    Monday, August 12, 2013 6:48 AM


  • User260886948 posted


    First we had to set a maxRequestLength to a larger value in our httpRuntime element to run the request for longer period.

        <httpRuntime maxRequestLength="102400" />

    Then we should define our binding as the following:

        <binding name="largeBinding"
              maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
              maxArrayLength="2147483647" maxBytesPerRead="2147483647"
              maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" />


    Best Regards,
    Amy Peng





    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 12, 2013 11:26 PM

All replies