Upload file with big size (over 130 MBytes) in ASP.NET. Please help!

B

bienwell

Hi all,

I developed an web page in ASP.NET to upload file into the server. In the
Web.config file, I declared
<httpRuntime executionTimeout="1200" maxRequestLength="400000" />

The MAX length is 129M or more for each file upload. I have 2 files
upload at the same time. Therefore, I set the timeout is 20min and the size
of file upload is > 390MB (400,000 KBytes).

I've tried the file upload in 3 servers. One server accepted 2 file
(129MBytes for each) upload at the same time. The time to process was 3-4
minutes. In the other two servers, the upload didn't perform well. The
page kept running for over 30 minutes and nothing happened. I closed the
browser beacuse I was afraid it could bring the server down.

I don't know the way I was doing is right or wrong ? Please give me your
advises to upload the files with the big size like this.

Thank you
 
G

Guest

Hi all,

I developed an web page in ASP.NET to upload file into the server. In the
Web.config file, I declared
<httpRuntime executionTimeout="1200" maxRequestLength="400000" />

The MAX length is 129M or more for each file upload. I have 2 files
upload at the same time. Therefore, I set the timeout is 20min and the size
of file upload is > 390MB (400,000 KBytes).

First of all, 1 MB = 1,0242^2

Plus you have to have some more because of the post header

I've tried the file upload in 3 servers. One server accepted 2 file
(129MBytes for each) upload at the same time. The time to process was 3-4
minutes. In the other two servers, the upload didn't perform well. The
page kept running for over 30 minutes and nothing happened. I closed the
browser beacuse I was afraid it could bring the server down.

because of ASP.NET health monitoring, you cannot upload very large
files in ASP.NET. The ASP.NET worker process has a virtual address
space of 2 gigabytes (GB). However, the ASP.NET worker process only
uses a little more than 1 GB because of health monitoring and memory
fragmentation.

During the upload process, ASP.NET loads the whole file in memory
before the user can save the file to the disk. Therefore, the process
may recycle because of the memoryLimit attribute of the processModel
tag in the Machine.config file. The memoryLimit attribute specifies
the percentage of physical memory that the ASP.NET worker process can
exhaust before the process is automatically recycled. Recycling
prevents memory leaks from causing ASP.NET to crash or to stop
responding.

Additionally, other factors play a role in the maximum file size that
can be uploaded. These factors include available memory, available
hard disk space, processor speed, and current network traffic. With
regular traffic of files being uploaded,

Microsoft recommends that you use a maximum file size in the range of
10 to 20 megabytes (MB). If you rarely upload files, the maximum file
size may be 100 MB.

http://support.microsoft.com/kb/295626
 
G

Guest

If this is going to be a process that needs to be robust, I'd suggest you
look for alternatives to HTTP POST to get those huge files to your server.
Peter
 
R

Rad [Visual C# MVP]

Hi all,

I developed an web page in ASP.NET to upload file into the server. In the
Web.config file, I declared
<httpRuntime executionTimeout="1200" maxRequestLength="400000" />

The MAX length is 129M or more for each file upload. I have 2 files
upload at the same time. Therefore, I set the timeout is 20min and the size
of file upload is > 390MB (400,000 KBytes).

I've tried the file upload in 3 servers. One server accepted 2 file
(129MBytes for each) upload at the same time. The time to process was 3-4
minutes. In the other two servers, the upload didn't perform well. The
page kept running for over 30 minutes and nothing happened. I closed the
browser beacuse I was afraid it could bring the server down.

I don't know the way I was doing is right or wrong ? Please give me your
advises to upload the files with the big size like this.

Thank you

Personally for such large files I'd try as a first resort to use FTP to do
the transfers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top