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?
source
share