Tech Off Thread

5 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Response.TransmitFile adding [1] to the filename

Back to Forum: Tech Off
  • User profile image
    ben2004uk

    Morning all,

    My intranet app I am trying to create is taking in some input from the user,  adding it to a CSV file,  encrypting the PGP file (using NSDPGP3.dll) with the same file name as the csv but .pgp at the end and then transmitting it to the end user.

    However when I do the transmitfile, the IE dialog box popups up and instread of the file name being correct as I added it ::

    Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName + ".pgp");

    it has fileName[1].pgp (as it would in effect be).

    Same with WriteFile.   anyone had this problem before?  The files on the harddrive itself do not contain the [1].

    Does TransmitFile write it to disk as a temp before sending it to the user and so is having two files instread?

    Any ideas welcome.

    Cheers

    Ben

  • User profile image
    Sven Groot

    It's more likely that this is something IE is doing than a problem on your end.

  • User profile image
    ben2004uk

    It also happens on another box.  When I add the filename into the header in code it is the correct filename.

  • User profile image
    Sven Groot

    You could use something like Ethereal or Fiddler to check what the actual header value getting sent to the client is.

  • User profile image
    W3bbo

    Sven Groot wrote:
    You could use something like Ethereal or Fiddler to check what the actual header value getting sent to the client is.


    How does Firefox handle it? (Check with Firefox's LiveHTTPHeaders extension)

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.