let's say i wanted to upload a 2GB file... :)

N

neilmcguigan

purely to see if it can be done, how would i go about uploading (and
while we're at it, downloading) a 2 GB file using ASP.Net and SQL
Server, as fast as possible?

something about chunks...

thanks!
 
B

Bruce Barker

the download is easy (turn off buffering and use writefile), but asp.net
does not support 2gb upload, beacuse the upload file is buffered in memory.
you will need to write or buy a component.

in any case trying to support files this large with asp.net will cause lots
of problems if you have very many users. the long transfers will tie up
thread pools, and limit you to about 60-100 (after you bump asp.net to the
max threads) concurrent users. (native iis only supports about 200, after
max parameters).


-- bruce (sqlwork.com)
 
J

JIMCO Software

Bruce said:
the download is easy (turn off buffering and use writefile), but
asp.net does not support 2gb upload, beacuse the upload file is
buffered in memory. you will need to write or buy a component.

in any case trying to support files this large with asp.net will
cause lots of problems if you have very many users. the long
transfers will tie up thread pools, and limit you to about 60-100
(after you bump asp.net to the max threads) concurrent users. (native
iis only supports about 200, after max parameters).


-- bruce (sqlwork.com)

This will work in 2.0.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
G

Guest

Hello,

Other then the large file size uploads, can you elaborate on the
differences or point me to some documentation that explains the differences
in ASP.NET and SAFileUp?

Chief
 
L

Lau Lei Cheong

It's good to know that Microsoft finally got this right. :)

But it wasn't easy to maintain that long transfer connection, especially
when low speed dialup connection is involved.

Why didn't Microsoft extend their support to BITS 2.0 to WinXP SP1 or below
(currently supports WinXP SP2 or above)? Supporting resume is a good thing,
and if user know they don't need to install more plugin for individual site
that's even better.
 
L

Lau Lei Cheong

I have a question.

In the HtmlInpuFile help page of v2.0 (
http://msdn2.microsoft.com/en-us/library/czkya88e(en-US,VS.80).aspx ), there
is some note like this:

aspnet_wp.exe (PID: 1520) was recycled because memory consumption exceeded
460 MB (60 percent of available RAM).
If you encounter this error message, increase the value of the memoryLimit
attribute in the processModel Element (ASP.NET Settings Schema) element of
the Web.config file for the application.

If the RequestLengthDiskThreshold have a default value if 256 bytes, how
could the memory consumption go this high?

Is the RequestLengthDiskThreshold has other use, or simply someone left this
note behind? This make me feel confusing.
 
J

JIMCO Software

Lau said:
I have a question.

In the HtmlInpuFile help page of v2.0 (
http://msdn2.microsoft.com/en-us/library/czkya88e(en-US,VS.80).aspx
), there is some note like this:

aspnet_wp.exe (PID: 1520) was recycled because memory consumption
exceeded 460 MB (60 percent of available RAM).
If you encounter this error message, increase the value of the
memoryLimit attribute in the processModel Element (ASP.NET Settings
Schema)
element of the Web.config file for the application.

I think there are a couple of doc problems here. The one you mention above
must just be a leftover from 1.x. The other thing is that I believe the
RequestLengthDiskThreshold is actually 256KB by default, not 256 bytes. I
know the docs say 256 bytes, but I'm not sure that's right. I'll have to
check later.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
J

JIMCO Software

JIMCO said:
I think there are a couple of doc problems here. The one you mention
above must just be a leftover from 1.x. The other thing is that I
believe the RequestLengthDiskThreshold is actually 256KB by default,
not 256 bytes. I know the docs say 256 bytes, but I'm not sure
that's right. I'll have to check later.

I just checked it. The documentation says it's 256 bytes. It's actually
80KB. The reason for making it default to 80KB is that it keeps those
buffers off of the LOH.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
G

Guest

Jim, you still haven't really answered Lau Lei Cheong's question, which I do
really want to know the answer.
Why did he still get the memory recycle problem if the
RequestLengthDiskThreshold is set?
I'm still in the 1.x world, so I solved it with overriding the httpmodule,
not very clean, but it works.
What I want to know if is all my code scrapable now that with 2.0 has a
spool to disk feature that won't eat up the memory on large uploads.

Not really sure why all of a sudden this thread turned into an advertisement
thread with components, I think 80% of all posters with questions about
upload are looking for solution WITHOUT needing to spend more money, and
hoping to find a solution by coding a workaround, not buying one.
 
J

JIMCO Software

Jason said:
Jim, you still haven't really answered Lau Lei Cheong's question,
which I do really want to know the answer.
Why did he still get the memory recycle problem if the
RequestLengthDiskThreshold is set?
I'm still in the 1.x world, so I solved it with overriding the
httpmodule, not very clean, but it works.
What I want to know if is all my code scrapable now that with 2.0 has
a spool to disk feature that won't eat up the memory on large uploads.

I didn't see that the process recycled due to high memory. All I know is
that RequestLengthDiskThreshold will save the buffer to disk once it reaches
80K in size. 80K is the default value. You can adjust it as you wish, but it
would be advisable to keep it under 85K.
 

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,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top