File Download Times Out On Slow Connections

H

Harry Whitehouse

I wrote a newbee ASPX application which allows authenticated users to
download a fairly large file (10 MB). After authentication in a simple SQL
table and picking what file the user will get, I give the commands shown
below. This works pretty well for folks on broadband, but dial-up users
tend to have the download interrupted after about 8-10 minutes.

Are there any session time out parameters I've forgotten to set? If
multiple users hit this page at the same time and are downloading the same
file, will this ASPX solution be somehow compromised?

TIA

Harry
Response.Clear();

Response.ClearHeaders();

Response.ClearContent();


Response.AddHeader("content-disposition","attachment; filename=" + myfile);

Response.AppendHeader("Content-Length", size.ToString());

Response.ContentType = "application/octet-stream";

Response.WriteFile(filename);

Response.End();
 
A

Andy Fish

Harry Whitehouse said:
Andy -- Thanks for this hint! That page also linked to an article about
downloading large files which I also applied to my application:

http://support.microsoft.com/?id=812406

hey thanks for that link, That's a problem that I could well hit in
some work I'm doing.

I have to say that just sucks big time - providing a special API to
send a file and then implementing it so it reads the whole file into
memory - D'oh!
 

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

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top