简体   繁体   中英

What is max file upload size in IIS6.0? and how do we overcome that?

In my application, I would like to upload files of size more than 3GB. I increased max file request timeout as high as possible.

But it is not even posting the page to the server when I select a 3GB file.

My web site configuration:

  1. Asp.Net 3.5
  2. IIS 6.0

Is it possible with the above configuration? If not what is the reason, and how do I resolve this?

You'll need to adjust both the timeout and request length in your web.config appropriately:

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

Of course keep in mind, a 3Gb file is going to require a lot of patience. In reality, I suggest investigating alternatives - HTTP post is not going to be pretty with files of this size.

I'd probably go with a FTP approach. Using FTPWebRequest - try Google for sample code.

Unfortunately adjusting the timeout and request length is not going to work. Your web server will run out of memory before the upload completes.

What you need is a file upload control that will break your upload into smaller chunks, so that you don't use all of the server's memory to hold the file while it is uploading.

One of the better file upload controls available is Darren Johnstone's ASP.NET File Upload control. This free control is a drop-in replacement for the standard ASP.NET file upload component, and is specifically designed to handle large files. It even includes a progress bar that doesn't require Flash.

Complete documentation and installation instructions are here :
http://darrenjohnstone.net/aspnet-file-uploaddownload-module-v2-documentation/

The control (and source code) can be downloaded here :
http://darrenjohnstone.net/downloads/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM