473,394 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 8608

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lvcha.gouqizi | last post by:
I embed an applet in my php script which has a parameter providing an input file for the jar. Does this file has size limit? The code is as follows: <APPLET ARCHIVE="myapplet.jar" WIDTH=372...
0
by: Antonio.P | last post by:
Hi to all. I am using an html form to upload files to zope. I'd like to limit the max upload size to 3Mb but I haven't found anything on the manual about it. Is it possible to put this limit? ...
2
by: steve | last post by:
I am setting up a huge database in mysql, and I get the above error in Linux. I believe it is related to the size of one of my tables, which is 4,294,966,772 bytes in size. Can someone help. How...
1
by: Vicky | last post by:
i am uploading a fiel in asp.net to web server. WEll it works fine for files having size of around 1 - 2 mb but as i upload file of 5-6 mb it does not work. Is there any limit of file size and how...
2
by: Abubakar | last post by:
Hi, I want to know the size of a given file on the server before downloading it. Say I'v a zip file whose url I know, now I want to know what size it is on the server. Thanx, Abubakar.
2
by: tjfdownsouth | last post by:
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...
9
by: eastcoastguyz | last post by:
I wrote a simple program to continue to create a very large file (on purpose), and even though there is plenty of disk space on that device the program aborted with the error message "File Size...
14
by: S N | last post by:
I am using the following code to hide the download url of files on my website. The code uses Response.Binarywrite to send file to the client. Kindly indicate the maximum size of the file that can be...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.