473,387 Members | 3,787 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,387 software developers and data experts.

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

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?
Dec 5 '07 #1
0 1386

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

Similar topics

1
by: Neil Woodvine | last post by:
***Scenario ... I have a DataList with a hyperlink WebControl in the Item Template. I want to display a 64x64 image in the Hyperlink and set the NavigateURL to the full size image. ***Source...
6
by: Joseph | last post by:
Hi! I have this webpage that contains some panels and buttons. I also want to output an Image to that same page, but when I save the image to the OutputStream using the Image.Save...
2
by: Jenny | last post by:
My application generates images dynamic. These images are then used for an image button like in the beneath. Dim ob As Bitmap = New Bitmap(130, 30) Dim banner As Graphics =...
2
by: 1 | last post by:
Hi there, A while back I wrote some code using the .Net drawing libraries... this code takes a datatable and generates a pie or bar chart on the fly. The resulting image is returned using...
4
by: Jerry | last post by:
I'm having just a bit of trouble wrapping my brain around the task of working with folders that are above the site's root folder. I let users upload photos (.jpg/.gif files) which can...
0
by: srivalli chavali via DotNetMonster.com | last post by:
Hi. I have a PDF file and a MHT file. Following is the code I'm using to read the file and display it INLINE in the browser. PageData is a MemoryStream object that contains the file's actual...
6
by: landers | last post by:
Hello All, I am having problems maintaining image quality when drawing text onto an image. I have a reasonable good quality GIF file with a transparent background. Whenever I write text onto...
7
by: eventuranza | last post by:
For my application, there users can upload and download files to the a webserver. Straightforward enough. However, when they upload a PDF file then try to download it, the file seems to be...
0
by: Chris Ashley | last post by:
I'm writing files directly to Response.OutputStream... setting the headers like so: HttpContext.Current.Response.Buffer = false; HttpContext.Current.Response.Clear();...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.