none
Error Code 413 Request entity too large RRS feed

  • Question

  • I have a WCF Service (Win2008 R2, IIS7.5) that returns this error from some of the clients. Each client sends some client specific data, along with the request for an update file, and some of the client data XMLs are larger than others. The response size, however, is the same for all. 

    Currently the request size that is failing is around 130 Kb.

    I have tried the following with no luck.

    1) Added maxBufferSize="10485760"  and maxReceivedMessageSize="10485760" to all of the bindings in the config file.

    2)Increased the uploadReadAhead size to 10485760 in both the site and parent server configurations.

    I've basically gone through everything on the forums and stack overflow and I'm still getting this error. Is there anything else I could be missing (parent setting inheretence, application type) that could be behind this?

    Thanks,

    Nigel.

    Wednesday, September 12, 2018 8:10 PM

All replies

  • Hi Nigel Tavendale,

    From your description, I suggest you try the following configuration.

            <binding

              name ="TestConfig"

              maxBufferPoolSize="2147483647"

              maxReceivedMessageSize="2147483647"

              maxBufferSize="2147483647" transferMode="Streamed">

            </binding>

    Don’t forget to apply the configuration between the client-side and server-side (you should also add this configuration on both the client-side and server-side endpoints.

    <endpoint binding="basicHttpBinding" bindingConfiguration="TestConfig" contract="BestService.IService" />

    Besides, due to the web application is hosted on the IIS. So the web server has corresponding limitation for request content.

    We could modify the <httpRuntime> section to set the size of request content.

    <configuration> <system.web>

     <httpRuntime maxRequestLength="2147483647" executionTimeout="3600" />

    </system.web> </configuration>

    Feel free to let me know if the problem still exists.

    Best Regards

    Abraham

    Saturday, September 15, 2018 3:47 PM
    Moderator
  • Unforuntely changing the maxRequestLength did not help (even restarted IIS).
    Tuesday, September 18, 2018 8:13 PM
  • Hi Nigel Tavendale,

    Would you mind sharing your project with me? In my opinion, if you have applied the configuration at the service endpoint of the client-side and server-side. the problem will be solved.

    Look forward to your reply.

    Best Regards

    Abraham

    Wednesday, September 19, 2018 2:00 AM
    Moderator