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

Discussion in 'ASP .Net' started by darren@yellowpencil.com, May 4, 2005.

  1. Guest

    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
     
    , May 4, 2005
    #1
    1. Advertising

  2. 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
     
    =?Utf-8?B?bGF0aGEgdmFsbGluYXlhZ2Ft?=, May 5, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Pet
    Replies:
    0
    Views:
    1,389
    Alex Pet
    Jan 20, 2004
  2. Darren

    Forced Download of PDF

    Darren, Mar 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    387
    Darren
    Mar 3, 2005
  3. xeroxero

    ASP.NET Forced Download Not Working

    xeroxero, Jan 25, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    523
  4. dany

    forced PDF-download in popup

    dany, Jun 30, 2003, in forum: ASP General
    Replies:
    1
    Views:
    129
    Tom Kaminski [MVP]
    Jun 30, 2003
  5. dany

    forced file download

    dany, Jul 1, 2003, in forum: ASP General
    Replies:
    1
    Views:
    129
Loading...

Share This Page