Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   ServerXMLHTTP failing with large binary files (http://www.velocityreviews.com/forums/t791558-serverxmlhttp-failing-with-large-binary-files.html)

Steve Troxell 11-12-2003 01:15 PM

ServerXMLHTTP failing with large binary files
 
I am trying to use ServerXMLHTTP in an ASP page to return a binary file
download to the browser. It works just fine with small files ( under 1 MB)
but seems to fail with large files (4 MB, 11 MB in tests). A success would
be that the browser kicks off the "Save As" file dialog. The failures are
not always the same. Sometimes the browser tries to download the ASP file
itself. Sometimes the the file seems to download successfully, but for
example only 1.6 MB of a 4 MB file are actually downloaded and it doesn't
seem to be a simple truncation. Sometimes I get "internal server error 500".
Below is my ASP code. "Project1.exe" is small enough to be successful. If
you substitute "OmniViewProSetup.exe" (4 MBs) it will fail.

<%
Response.Buffer = True
Dim xml
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

xml.Open "GET",
"http://www.krell-software.com/downloads/test/project1.exe", False
xml.Send

Response.AddHeader "Content-Disposition", "attachment;
filename=project1.exe"
Response.ContentType = "application/octet-stream"
Response.BinaryWrite xml.responseBody

Set xml = Nothing

%>

--
Steve Troxell
Krell Software - Database Tools for MS SQL Server
http://www.krell-software.com



Jhonny Vargas P. [MVP] 11-12-2003 08:34 PM

Re: ServerXMLHTTP failing with large binary files
 
Hi,

Probably the page falls by timeout...

You review the page, if you have a Server.ScriptTimeout = 0, else you writes
it in the begin of the page.

Sorry for my english!!!!...

--
Saludos,
Jhonny Vargas P. [MS MVP]
Santiago de Chile




"Steve Troxell" <steve_troxell@hotmail.spamBgone.com> wrote in message
news:uGbOA8RqDHA.2636@tk2msftngp13.phx.gbl...
> I am trying to use ServerXMLHTTP in an ASP page to return a binary file
> download to the browser. It works just fine with small files ( under 1 MB)
> but seems to fail with large files (4 MB, 11 MB in tests). A success would
> be that the browser kicks off the "Save As" file dialog. The failures are
> not always the same. Sometimes the browser tries to download the ASP file
> itself. Sometimes the the file seems to download successfully, but for
> example only 1.6 MB of a 4 MB file are actually downloaded and it doesn't
> seem to be a simple truncation. Sometimes I get "internal server error

500".
> Below is my ASP code. "Project1.exe" is small enough to be successful. If
> you substitute "OmniViewProSetup.exe" (4 MBs) it will fail.
>
> <%
> Response.Buffer = True
> Dim xml
> Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
>
> xml.Open "GET",
> "http://www.krell-software.com/downloads/test/project1.exe", False
> xml.Send
>
> Response.AddHeader "Content-Disposition", "attachment;
> filename=project1.exe"
> Response.ContentType = "application/octet-stream"
> Response.BinaryWrite xml.responseBody
>
> Set xml = Nothing
>
> %>
>
> --
> Steve Troxell
> Krell Software - Database Tools for MS SQL Server
> http://www.krell-software.com
>
>




Steve Troxell 11-13-2003 01:17 PM

Re: ServerXMLHTTP failing with large binary files
 
Jhonny Vargas P. [MVP] wrote:
> Hi,
>
> Probably the page falls by timeout...
>
> You review the page, if you have a Server.ScriptTimeout = 0, else you
> writes it in the begin of the page.


I don't believe it's a timeout issue. I set Server.ScriptTimeout = 600 and
still had problems. It sometimes takes a few seconds, but never more than
that.

--
Steve Troxell
Krell Software - Database Tools for MS SQL Server
http://www.krell-software.com




All times are GMT. The time now is 12:43 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57