473,467 Members | 1,300 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1392

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();...
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:
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.