Http Post Request File size limit ( Http 500 error)

Fatih Ceylan 1 Reputation point
2022-02-25T10:19:02.73+00:00

I wrote an web api application on asp.net, an erp system sending 30 mb of a xml file to web api with HTTP Post Method, (i can upload to web api 12-25 mb xml file but it is not stable, some times it is throwing http 500 error)the hosting server returning HTTP 500 error , How can i change the HTTP request file size limit on Azure Webapp. I am using Azure WebApp service and Azure SQL Database Service.

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

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2022-02-25T23:19:36.793+00:00

    If you're using .net 4.8, you should be able to use MaxRequestLength to increase the request size, assuming your app is hosted inside a Windows app service plan. For .netcore, there's a IISServerOptions that exposes a MaxRequestLength property.

    However, I would advise breaking the file up into pieces and streaming the bits to be more efficient.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.