C
Chris Ashley
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?
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?