468,765 Members | 812 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

File download size limit

I have a site that allows a person to log in and get a list of files to
download for them. If the file size is under 65MB then everything is fine,
they click the download button and the save box pops up. But if the file is
larger than 65MB the page sits and processes until it times out. I can't
figure it out becaus a 64MB file loads immediately for download while one
slightly larger hangs up.

Any assistance on this will be greatly appreciated. Tim
Jun 30 '06 #1
4 8265

"tjfdownsouth" <tj**********@discussions.microsoft.comwrote in message
news:0E**********************************@microsof t.com...
I have a site that allows a person to log in and get a list of files to
download for them. If the file size is under 65MB then everything is
fine,
they click the download button and the save box pops up. But if the file
is
larger than 65MB the page sits and processes until it times out. I can't
figure it out becaus a 64MB file loads immediately for download while one
slightly larger hangs up.

Any assistance on this will be greatly appreciated. Tim
Is the link to the file supplied a direct URL for the file in a web folder
or is it a link to an ASP page which streams the file content to the client.

If the latter then it may be a buffer size limit. You could increase the
buffer limit but the real solution would be to code the ASP to allow the
file to be streamed properly rather than being buffered. This involves two
things: make sure Response.Buffer = False and don't use BinaryWrite to send
the whole contents of the file at once.

Jul 3 '06 #2
This is the code I am using to download the file when a user click the
download button:

FileInfo targetFile = new FileInfo(filePath);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" +
targetFile.Name);
Response.AddHeader("Content_Length", targetFile.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(targetFile.FullName);
Response.End();

"Anthony Jones" wrote:
>
"tjfdownsouth" <tj**********@discussions.microsoft.comwrote in message
news:0E**********************************@microsof t.com...
I have a site that allows a person to log in and get a list of files to
download for them. If the file size is under 65MB then everything is
fine,
they click the download button and the save box pops up. But if the file
is
larger than 65MB the page sits and processes until it times out. I can't
figure it out becaus a 64MB file loads immediately for download while one
slightly larger hangs up.

Any assistance on this will be greatly appreciated. Tim

Is the link to the file supplied a direct URL for the file in a web folder
or is it a link to an ASP page which streams the file content to the client.

If the latter then it may be a buffer size limit. You could increase the
buffer limit but the real solution would be to code the ASP to allow the
file to be streamed properly rather than being buffered. This involves two
things: make sure Response.Buffer = False and don't use BinaryWrite to send
the whole contents of the file at once.

Jul 6 '06 #3

"tjfdownsouth" <tj**********@discussions.microsoft.comwrote in message
news:4B**********************************@microsof t.com...
This is the code I am using to download the file when a user click the
download button:

FileInfo targetFile = new FileInfo(filePath);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename="
+
targetFile.Name);
Response.AddHeader("Content_Length",
targetFile.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(targetFile.FullName);
Response.End();
WriteFile is a member of HttpResponse in ASP.NET. You've posted to a
Classic ASP NG.

However it does sound like you are exceeding the server buffer. Replace
Response.Clear() with Response.Buffer = False.
"Anthony Jones" wrote:

"tjfdownsouth" <tj**********@discussions.microsoft.comwrote in message
news:0E**********************************@microsof t.com...
I have a site that allows a person to log in and get a list of files
to
download for them. If the file size is under 65MB then everything is
fine,
they click the download button and the save box pops up. But if the
file
is
larger than 65MB the page sits and processes until it times out. I
can't
figure it out becaus a 64MB file loads immediately for download while
one
slightly larger hangs up.
>
Any assistance on this will be greatly appreciated. Tim
Is the link to the file supplied a direct URL for the file in a web
folder
or is it a link to an ASP page which streams the file content to the
client.

If the latter then it may be a buffer size limit. You could increase
the
buffer limit but the real solution would be to code the ASP to allow the
file to be streamed properly rather than being buffered. This involves
two
things: make sure Response.Buffer = False and don't use BinaryWrite to
send
the whole contents of the file at once.



Jul 6 '06 #4
Anthony I tried your suggestion and it is still having trouble, it is not
having an error but it still does not operate the same. If the file is less
than 65MB it immediately pops up a dialog if it is more it just sits there
processing. Thanks for your help I will try in the .net forum also.

Tim

"Anthony Jones" wrote:
>
"tjfdownsouth" <tj**********@discussions.microsoft.comwrote in message
news:4B**********************************@microsof t.com...
This is the code I am using to download the file when a user click the
download button:

FileInfo targetFile = new FileInfo(filePath);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename="
+
targetFile.Name);
Response.AddHeader("Content_Length",
targetFile.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(targetFile.FullName);
Response.End();

WriteFile is a member of HttpResponse in ASP.NET. You've posted to a
Classic ASP NG.

However it does sound like you are exceeding the server buffer. Replace
Response.Clear() with Response.Buffer = False.
"Anthony Jones" wrote:
>
"tjfdownsouth" <tj**********@discussions.microsoft.comwrote in message
news:0E**********************************@microsof t.com...
I have a site that allows a person to log in and get a list of files
to
download for them. If the file size is under 65MB then everything is
fine,
they click the download button and the save box pops up. But if the
file
is
larger than 65MB the page sits and processes until it times out. I
can't
figure it out becaus a 64MB file loads immediately for download while
one
slightly larger hangs up.

Any assistance on this will be greatly appreciated. Tim
>
Is the link to the file supplied a direct URL for the file in a web
folder
or is it a link to an ASP page which streams the file content to the
client.
>
If the latter then it may be a buffer size limit. You could increase
the
buffer limit but the real solution would be to code the ASP to allow the
file to be streamed properly rather than being buffered. This involves
two
things: make sure Response.Buffer = False and don't use BinaryWrite to
send
the whole contents of the file at once.
>
>
>
>


Jul 8 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by lvcha.gouqizi | last post: by
reply views Thread by Antonio.P | last post: by
2 posts views Thread by steve | last post: by
1 post views Thread by Vicky | last post: by
2 posts views Thread by Abubakar | last post: by
2 posts views Thread by tjfdownsouth | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.