By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,979 Members | 951 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,979 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Mar 2 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Mar 2, 5:15 pm, "bienwell" <bienw...@hotmail.comwrote:
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

Mar 2 '07 #2

P: n/a
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

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"bienwell" wrote:
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

Mar 2 '07 #3

P: n/a
On Fri, 2 Mar 2007 11:15:12 -0500, bienwell wrote:
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
--
Bits.Bytes
http://bytes.thinkersroom.com
Mar 3 '07 #4

P: n/a
"Rad [Visual C# MVP]" <no****@nospam.comwrote in message
news:1b***************@thinkersroom.com...
Personally for such large files I'd try as a first resort to use FTP to do
the transfers
Me too...
Mar 3 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.