Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preventing browser timeout on large file uploads

I have a nice little file upload control I wrote for ASP.NET webforms that utilizes an IFrame and ASP.NET AJAX.

However, on large uploads, the browser times out before it can finish posting the form.

Is there a way I can increase this?

I'm not really interesting in alternative solutions, so don't suggest changing the entire thing out please. It works good for <5 meg uploads, I'd just like to get it up to about 8mb.

EDIT: Setting the timeout in Page_Load didn't appear to change anything.

like image 742
FlySwat Avatar asked Oct 21 '08 22:10

FlySwat


1 Answers

You need to update a metabase setting on IIS6 and later. The key is " AspMaxRequestEntityAllowed" and is expressed in bytes. I highly recommend the Metabase Explorer to make the change, wading through the XML at %systemroot%\system32\inetserv\metabase.xml is possible though.

Metabase Explorer: http://support.microsoft.com/kb/840671

Hmmm, perhaps I'm barking up the wrong tree... you wouldn't be doing 5 MB files if that wasn't already adjusted.

Another stab at it: see your web.config:

<system.web>
  <httpRuntime  maxRequestLength="10240" executionTimeout="360"/>
</system.web>

Max request length is in kilobytes and execution timeout is in seconds.

like image 185
Godeke Avatar answered Oct 13 '22 01:10

Godeke