Download a file larger than 3 GB using Asp.Net MVC and IIS

I have an HTTP PUT web API method in my MVC application that receives files from the client side and puts them in the server storage.

Since the file size can be large, I don’t pump the file into memory to avoid memory errors from related exceptions, so I use MultipartFormDataStreamProvider to load it to a temporary folder and move this final destination later.

Everything works fine, except for the fact that it does not download files larger than 2097148 KB (2.097 GB). As soon as I give the file more than it, it will start transferring it to the Temp folder, and then stop as soon as the file size reaches 2097148 KB.

I have the following attributes in the web.config file:

maxRequestLength = "5097151",

requestLengthDiskThreshold = "50971",

maxAllowedContentLength = "4242880000".

Also in IIS I set the Maximum Allowed Content Length (bytes) to 4242880000 KB.

Is there any other place that could lead to this?

+4
source share
1 answer

Update

It seems that even in IIS 10 with .NET 4.6.1, the request is rejected (400 Bad Request), although all restrictions are set to resolve it.

Digging further, it seems that this was rejected by Microsoft.


.NET 4.0 ASP.NET 2 , .Net 4.5. , IIS 2 .

2Gb , IIS, - . , :

, , PUT Range.

HttpListener. HttpListener IIS, .


+2

All Articles