Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Files being written to Response.OutputStream hang 25% of the time

Reply
Thread Tools

Files being written to Response.OutputStream hang 25% of the time

 
 
Chris Ashley
Guest
Posts: n/a
 
      12-05-2007
I'm writing files directly to Response.OutputStream... setting the
headers like so:

HttpContext.Current.Response.Buffer = false;
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ContentType = "binary/octet-
stream";
HttpContext.Current.Response.AddHeader("content-disposition",
"attachment;filename=" + strOutputFilename);
long lngSize = GetFileSize(strFTPURL, strFileName);
HttpContext.Current.Response.AddHeader("Content-Length",
lngSize.ToString());
HttpContext.Current.Response.Flush();

BeginDownloadToStream(HttpContext.Current.Response .OutputStream,
strFileName);

About 25% of the time, when the user downloads the file, the file
download box hangs at 99%.

If the user then clicks cancel and tries to download the same file
again, it works every single time.

Problem is not isolated to any particular file... just happens 25% of
the time with random files, and always works the second time around.

No exceptions are being thrown anywhere, so I'm at a loss as to what
is going wrong...

anybody have any ideas?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generally, are the programs written by C++ slower than written by C10% ? KaiWen C++ 102 09-14-2011 11:12 PM
Files being written to Response.OutputStream hang 25% of the time Chris Ashley ASP .Net 0 12-05-2007 09:26 PM
grabbing values from standard INPUT TEXT fields that are being dynamically written? Darrel ASP .Net 3 11-13-2004 11:01 PM
SetAuthCookie works, but our cookies aren't being written - HELP =?Utf-8?B?VHlzb24gQnJvd24=?= ASP .Net 1 05-04-2004 04:27 AM
Re: Can a usercontrol written in C# be used in Web Forms that is written in VB.Net? Steve C. Orr, MCSD ASP .Net 1 08-24-2003 12:06 AM



Advertisments