7
votes

As far as I know IIS and ASP.NET has a limitation of 2Gb files upload. Are there any solutions for this in IIS 7.5 and .Net 4?

2
You want to upload files that are 2+ GB via HTTP?! You're aware that uploads are capped around 128K on residential broadband, depending on the ISP...OMG Ponies
128K??? What ISP are you using? Even most dial-up providers allow uploads larger than that (or are you referring to speed?).bbosak
In general there is a max bandwidth cap. Here is a recent example. However, I believe @OMG refers to max upload speed. Anyway, that shouldn't concern us because we don't know the exact case of user695797's application. She/He may use it on her/his lan or in a way that upload speed isn't a problem.Master_ex
Hey OMG, its for corporate intranet.IT Hit WebDAV

2 Answers

2
votes

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

From the blog post:

When the integrated pipeline is used, we go though webengine code (webengine4!MgdGetRequestBasics) which doesn't support more than 2 GB content-length and a System.ArithmeticException exception is raised which subsequently cause the HTTP 400 error. With the classic pipeline, we don't use webengine4 but the old ASPNET_ISAPI model and we don't hit the above issue.

The post also describes how the author was able to upload files larger than 2 gigs.

1
votes

Have a look here.

You have to add to your application's web.config the following code:

<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 modify the maxRequestLength and executionTimeout attributes of this key as mentioned in the reference I gave you.

I hope this works for you.