Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Forced download of PDF producing 0kb PDF on only 1 computer

Reply
Thread Tools

Forced download of PDF producing 0kb PDF on only 1 computer

 
 
darren@yellowpencil.com
Guest
Posts: n/a
 
      05-04-2005
Dear Groups,

I have a hosted application which allows subscribers to purchase PDF
documents. Once purchased, these documents are accessible from a user
private library to be downloaded at will.

All is well with this process except for one Windows XP computer which
keeps returning PDFs with nothing in them resulting in an error similar
to "Acrobat cannot open this document, the file type is either
unsupported or damaged, etc".

The code which grabs the PDF onclick is this:

filename = "whatever.PDF";
Session["FilePath"]=Server.MapPath("../docPDF/");
Response.ClearContent();
Response.ClearHeaders ();
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition","attachment; filename=" +
filename)
Response.WriteFile(Session["FilePath"].ToString() + filename)
Response.Flush();
Response.Close();

If anyone has any insight into this, it would be most appreciated.

Darren

 
Reply With Quote
 
 
 
 
=?Utf-8?B?bGF0aGEgdmFsbGluYXlhZ2Ft?=
Guest
Posts: n/a
 
      05-05-2005
this is the problem of the temporary files getting filled up. Clear the
temporary folders by clicking in IE-->tool --> internet options --> delete
files. You should be able to download the pdfs after that without any issue
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forced Download of PDF Darren ASP .Net 3 03-03-2005 12:23 AM
0kb of RAM left, What to do to reclaim it?? fredcromer Computer Support 8 06-18-2004 08:59 PM
Why asp.net create 0kb file on file1.postedfile.saveas. Alex Pet ASP .Net 0 01-20-2004 04:48 PM
Forced video AND forced audio from Universal Invalid Address DVD Video 32 01-18-2004 05:29 PM
Autoexec nai file 0KB buffy Computer Support 3 12-09-2003 07:55 PM



Advertisments