How to upload files via 2Gb in IIS 7.5 / .Net 4?

As far as I know, IIS and ASP.NET have a 2Gb file upload limit. Are there any solutions for this in IIS 7.5 and .Net 4?

+7
source share
2 answers

Take a look here .

You must add the following code to your web.config application:

<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength ="2147482624" /><!--this value in bytes~2GB--> </requestFiltering> </security> <system.webServer> 

Also in web.config, find the system.web section and the httpRuntime key and change the maxRequestLength and executeTimeout attributes of this key, as indicated in the link I gave you.

I hope this works for you.

+2
source

I found a blog post explaining the cryptic error "ASP.NET detected invalid characters in the URL."

From the blog post:

When the integrated pipeline is used, we go though the web code (webengine4! MgdGetRequestBasics) which does not support more than 2 GB content length and a System.ArithmeticException exception which subsequently cause an HTTP 400 error. With the classic we do not use webengine4, but the old model ASPNET_ISAPI and We do not address the above problem.

The message also describes how the author could upload files larger than 2 concerts.

+2
source

All Articles