473,385 Members | 1,769 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,385 software developers and data experts.

Download binaries larger than 20MB via ASP

I'm facing the folowing problem:

I have a very simple ASP (not aspx) page that is used to dowload binary
files.

//================================================== ========
<%@ Language=JavaScript %>

<%
function GetBinaryFile( strFilePath )
{
var oStream;
oStream = Server.CreateObject("ADODB.Stream");
oStream.Open();
oStream.Type = 1; // 1 = Binary
oStream.LoadFromFile(strFilePath) // Retreive binary data from the file

return oStream.read //Return the binary data to the caller
}

var file2Return = "file.bin";
Response.Clear();
Response.ContentType = "binary/octet-stream";
Response.AddHeader("Content-Disposition","attachment;filename="+file2Return); var fileLocation = Server.MapPath(file2Return); Response.BinaryWrite(GetBinaryFile(fileLocation)); %>//================================================== ========When the file to be dowloaded is more than 20 MB, the download fails.Previously, there was a limit at 4MB, but I found a setting responsible forthat(AspBufferingLimit). I've changed that to 100MB, but it helped only forfilessmaller than 20MB.What else is responsible for the constraint ??I'm running IIS 6 (Win2003 Server).The problem DOES NOT exist with IIS 5.1 (XP Pro) Please help Micha³ Januszczyk

Jul 22 '05 #1
6 4517
Micha³ Januszczyk wrote:
I'm facing the folowing problem:

I have a very simple ASP (not aspx) page that is used to dowload
binary files.

http://www.aspsmart.com/scripts/aspS...asp?P=267&L=EN

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #2
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote:
news:el**************@TK2MSFTNGP14.phx.gbl...
http://www.aspsmart.com/scripts/aspS...asp?P=267&L=EN

quote:
//====================
24)

Using IIS 6: If you get the above error when you click on an attachment, the
attachment is larger than IIS is configured to allow. Change the
AspBufferingLimit setting in Metabase.xml to a larger size. The default
value is 4194304, which is about 4 MB. Change this to whatever limit is
reasonable for the types of files your users will be attaching.
//======================

However, I've already changed this (AspBufferingLimit) to very big value
(~100MB) , and I was able to download files bigger than 4 MB (original
AspBufferingLimit setting) but not larger than 20MB.
I'm asking how to increase this 20MB constraint.

Regards,
Micha³ Januszczyk
Jul 22 '05 #3
Micha³ Januszczyk wrote:
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote:
news:el**************@TK2MSFTNGP14.phx.gbl...
http://www.aspsmart.com/scripts/aspS...asp?P=267&L=EN

quote:
//====================
24)

Using IIS 6: If you get the above error when you click on an
attachment, the attachment is larger than IIS is configured to allow.
Change the AspBufferingLimit setting in Metabase.xml to a larger
size. The default value is 4194304, which is about 4 MB. Change this
to whatever limit is reasonable for the types of files your users
will be attaching. //======================

However, I've already changed this (AspBufferingLimit) to very big
value (~100MB) , and I was able to download files bigger than 4 MB
(original AspBufferingLimit setting) but not larger than 20MB.
I'm asking how to increase this 20MB constraint.

The formatting of your original message made it very hard to read, so I
missed where you said that.

I don't know the answer to your questtion. I suggest posting to
..inetserver.iis if you don't receive an answer here.

You may need to resort to ftp. 20 MB is not a file I would be using ASP to
handle. You really don't want to be tying up a thread for the length of time
it would take to transfer a file of this size.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #4
"Micha³ Januszczyk" wrote in message
news:uS**************@TK2MSFTNGP12.phx.gbl...
: "Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote:
: news:el**************@TK2MSFTNGP14.phx.gbl...
:
: >
http://www.aspsmart.com/scripts/aspS...asp?P=267&L=EN
:
:
: quote:
: //====================
: 24)
:
: Using IIS 6: If you get the above error when you click on an attachment,
the
: attachment is larger than IIS is configured to allow. Change the
: AspBufferingLimit setting in Metabase.xml to a larger size. The default
: value is 4194304, which is about 4 MB. Change this to whatever limit is
: reasonable for the types of files your users will be attaching.
: //======================
:
: However, I've already changed this (AspBufferingLimit) to very big value
: (~100MB) , and I was able to download files bigger than 4 MB (original
: AspBufferingLimit setting) but not larger than 20MB.
: I'm asking how to increase this 20MB constraint.

Is this file already in a compressed format? And ditto on using FTP. It's
just as easy to point someone to an anonymous ftp site as using HTTP.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #5

I'm having exactly the same problem. Have you found a solution yet?

Peace
Lau

--
lau_gu
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Dec 13 '05 #6

lau_gu wrote:
I'm having exactly the same problem. Have you found a solution yet?

Peace
Lau


Are you sure it's not a timeout issue?

Dec 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: peetm | last post by:
I'd like to write to a log whenever a visitor to my site downloads a file. So, I'd like the link they click to be to a php 'page' that returns the file. Don't know how to do that! Side...
11
by: Jim Willsher | last post by:
Hi all, PHP 4.2.2 on RedHat9 I have some files on my website for people to download, and I want to generate the file location "on the fly", so the URL is held in a database. I have a simple...
8
by: Radioactive Man | last post by:
I am fairly new to the latest verion of Python and using it on windows 95, 2000, and/or XP. What libraries, modules, functions, etc. would I need to set up a Python script to download a file, say...
2
by: Medi Montaseri | last post by:
I was wondering if anyone else has noticed that binaries produced by g++ 3.x are almost twice as big as the ones produced by g++ 2.95. Thanks
5
by: Scott H | last post by:
I spent most of yesterday looking into this, and still didn't really find an answer... I have a .NET2.0 app that I need to install on a server, and then possibly several other servers later, it...
2
by: jcharth | last post by:
Hello I am trying to test the downloader script from http://www.ondotnet.com/pub/a/dotnet/2002/04/01/asp.html it seems to work but only for files 20mb The name of the files is...
4
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...
1
by: Tim Jones | last post by:
I have a web site where we offer MP3 downloads (yes, they are legal!). I've written a PHP script using readfile() (or fpassthru()) that sends the file using HTTP headers (via various header()...
3
by: adda | last post by:
The following link offers binary for download http://www.equation.com/servlet/equation.cmd?call=compilerblog 32-bit binary includes fortran,c, and c++; 64-bit has c and fortran. gcc 4.3.2...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.