Node.js Linux App Service raising Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Request body too large error

Sriram, Varun 1 Reputation point

We are using Azure Node.js Linux App service, we are running into below error when we try uploading large files ~30MB


Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,381 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. ajkuma 24,736 Reputation points Microsoft Employee

    @Sriram, Varun , Welcome to Microsoft Q&A! Thanks for posting the question.

    Apologies for the delay! When Easy auth and CORS features are turned on a middleware docker container is created and all requests are routed through them. You could handle the CORS within the application code in order to avoid the limit. Turn off these features and implement custom authorization and CORS application code within the app service.
    Kindly see the document for current .NET core middleware limitation.

    Also, checkout these best practices for running Node.js WebApps:

    KestrelServerLimits.MaxRequestBodySize Property

    0 comments No comments

  2. Anton Clark 1 Reputation point

    Long Path Tool will let you easily delete, copy or

    rename long path files.

    0 comments No comments