Download binaries larger than 20MB via ASP

Discussion in 'ASP General' started by Micha³ Januszczyk, Mar 17, 2005.

  1. 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
     
    Micha³ Januszczyk, Mar 17, 2005
    #1
    1. Advertising

  2. Bob Barrows [MVP], Mar 17, 2005
    #2
    1. Advertising

  3. "Bob Barrows [MVP]" <> wrote:
    news:...

    > http://www.aspsmart.com/scripts/aspSmartUpload/publigen/content/templates/show.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
     
    Micha³ Januszczyk, Mar 17, 2005
    #3
  4. Micha³ Januszczyk wrote:
    > "Bob Barrows [MVP]" <> wrote:
    > news:...
    >
    >>

    http://www.aspsmart.com/scripts/aspSmartUpload/publigen/content/templates/show.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.
     
    Bob Barrows [MVP], Mar 17, 2005
    #4
  5. Micha³ Januszczyk

    Roland Hall Guest

    "Micha³ Januszczyk" wrote in message
    news:...
    : "Bob Barrows [MVP]" <> wrote:
    : news:...
    :
    : >
    http://www.aspsmart.com/scripts/aspSmartUpload/publigen/content/templates/show.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
     
    Roland Hall, Mar 17, 2005
    #5
  6. Micha³ Januszczyk

    Larry Bud Guest

    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?
     
    Larry Bud, Dec 13, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGFuaWVs?=

    upload 20MB file ?

    =?Utf-8?B?RGFuaWVs?=, Sep 9, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    624
    =?Utf-8?B?RGFuaWVs?=
    Sep 9, 2005
  2. Peter Williams
    Replies:
    1
    Views:
    1,460
    Dylan Parry
    Jun 3, 2005
  3. Medi Montaseri
    Replies:
    2
    Views:
    296
    Gianni Mariani
    Nov 27, 2003
  4. Michael

    Free 20mb Webspace

    Michael, Nov 4, 2006, in forum: HTML
    Replies:
    2
    Views:
    427
    Jim Moe
    Nov 5, 2006
  5. KevinSimonson
    Replies:
    17
    Views:
    708
    KevinSimonson
    Sep 28, 2009
Loading...

Share This Page