473,394 Members | 1,932 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,394 software developers and data experts.

Downloading a PDF fails

I have not much good response lately on the ASP.NET website, so i'll try it
here.

I have a problem with downloading a PDF by using the response object.

A part of it:
..Response.Clear()
..Response.ContentType = sFileType
..Response.AppendHeader("Content-Disposition", "attachment; filename=" &
sFileNameOut)
..Response.AppendHeader("Content-Length", fs.Length.ToString)
..Response.AppendHeader("Content-Transfer-Encoding", "BINARY")
..Response.Flush()

And a binary data loop.
This does work fine for several purposes but for this PDF it seems to fail
but ONLY when using the OPEN button.
When i choose for save as and open it then it shows fine.
I traced the log using a filemon tool and it seems IE clears the cache and
removes the file before the Adobe reader can open it.

It's odd, my simple test app using the same code runs fine.

I can't find the problem, the PDF is downloaded fine, before i choose OPEN i
located the file in the IE download folder and tried to open it, it shows
fine.

???
Nov 22 '05 #1
0 963

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

Similar topics

1
by: Hugh McLaughlin | last post by:
Hello everyone and thanks for your help in advance. I am working on an application that allows a user to downlad a zip file from an FTP site. I have used the following code: Dim URL As String...
1
by: Havic Ploccin | last post by:
First question, is this possible? If so, can somebody please give me some tips on where I can get the CAB files etc? Second question, I would like to prevent downloading some other ActiveX...
18
by: James | last post by:
I'm having a problem using the System.Net.WebClient to download .exes from a web server. I'm testing everything on localhost, and the same code works fine with all other types of file. I even tried...
0
by: Edwin Knoppert | last post by:
I have not much good response lately on the ASP.NET website, so i'll try it here. I have a problem with downloading a PDF by using the response object. A part of it: ..Response.Clear()...
4
by: Edwin Knoppert | last post by:
I have a problem with downloading a PDF by using the response object. A part of it: ..Response.Clear() ..Response.ContentType = sFileType ..Response.AppendHeader("Content-Disposition",...
1
by: just.starting | last post by:
Hi, My dot net client downloads files and checks for any new files time to time. The server is apache2.0.53 server. So what happens is that my file download thing works fine if I dont try to call...
0
by: just.starting | last post by:
I am having problem while downloading files from an apache server2.0.53 with php4.3.10.While downloading some files it generally stops after downloading some specific amount and then stops...
10
by: DBC User | last post by:
Hi All, Quick question, in my program I need to download a large file (100MB) file. I would like to know how can I do this in segments so that if the download fails, I will able to download from...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
1
by: dino d. | last post by:
Hi - I have a restricted download I want to set up. It's about 19 megs. It downloads fine, but it mysteriously adds 2 extra bytes to the file. If I grab the file directly via ftp, it's fine,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.