1

I have Node.js app hosted on Azure. It's "Web app" in pricing tier "Default2 (Free)". When I try to send JSON larger than 64kB server returns HTTP error 413 ("Request Entity Too Large") with body Payload Too Large.

Setting this in Web.config file didn't help:

<configuration>
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="102400000" />
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>
Peter Pan
  • 20,663
  • 4
  • 18
  • 35
Ginden
  • 4,383
  • 28
  • 62

2 Answers2

2

Per my experience, I think the issue was not caused by the configuration for Azure IIS.

There were two answered SO threads seem helpful for you.

  1. For resolving the issue of request body too large, please see Error: request entity too large.

  2. For resolving the issue of request header size limit, please see nodeJS max header size in http.request.

Hope it helps.

Any concern, please feel free to let me know.

Community
  • 1
  • 1
Peter Pan
  • 20,663
  • 4
  • 18
  • 35
0

Can you try that: Node.js: how to limit the HTTP request size and upload file size?

and that?

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

Both of that were the solutions of the similar issues in the past, so please let know if that works (or not).

Community
  • 1
  • 1
Alex Belotserkovskiy
  • 3,854
  • 1
  • 10
  • 9