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

D

darren

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top