473,379 Members | 1,530 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,379 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.

???
Sep 16 '05 #1
0 969

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...
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",...
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()...
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...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.