locked
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.

    Thanks
    Viky


     

    Monday, August 12, 2013 6:48 AM

Answers

  • User260886948 posted

    Hi,

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

    <system.web> 
        <httpRuntime maxRequestLength="102400" />
     </system.web>

    Then we should define our binding as the following:

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

     

    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