question

AmarnathManchala-5911 avatar image
0 Votes"
AmarnathManchala-5911 asked SeanArmstrong-1506 published

Azure WEB API with large payload

Hi All,

I have deployed the Asp.net core REST service to Azure as WEB APP.

When I tested the service in n local environment in Visual Studio, the service is working fine with large payload.
When service is running in Local it is accepting the large payload (500 MB size) and responding with large payload (500 MB ).
After deploying this service to Azure Web APP, service is not working with large payload, for smaller payloads service is working fine, but for large payloads service is throwing 500 Server internal error.

I have added the 'RequestSizelimits' on the action methods to support large payload.

but still not responding with large payload messages


azure-webapps
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for reaching here! If you are using ASP.NET Core 2.0.0? If so, As its mentioned here

Starting in ASP.NET Core 2.0.0, both Kestrel and HttpSys will be enforcing a a 30MB (~28.6 MiB) max request body size limit.

If the request body size exceeds the configured max request body size limit, the call to Request.Body.ReadAsync will throw an IOException. If this exception is uncaught, Kestrel will respond with a 413 Payload Too Large response and HttpSys will respond with a generic 500 Internal Server Error response.

This limit can be changed either globally or on a per-request basis, and is disabled for Kestrel running behind IIS where the normal web.config limit still applies.

Let us know.


0 Votes 0 ·

Hi Sneha,

I have verified the application running on local development (Running server application in Visual Studio) and it worked well with 500 MB payload, after I have promoted code to Azure after that it is not working with 500 MB file for smaller files it working fine.

for larger file we are getting 500 Internal server error.

Below code block I have added to support large payload and still I don't have luck on it.

in the webBuilder section i have added Limits.MaxResponseBuffersize=250000000

0 Votes 0 ·

Apologize for late response on this! Could you please confirm on which tier/sku you have deployed your web app?

0 Votes 0 ·

1 Answer

SeanArmstrong-1506 avatar image
0 Votes"
SeanArmstrong-1506 answered SeanArmstrong-1506 published

Hi, did you every find a resolution for this?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.