The solution I came to was the following:
- ASP.NET( BinaryData.aspx), PDF. Page_Load, :
protected void Page_Load(object sender, System.EventArgs e)
{
Response.ContentType = "Application/pdf";
Response.AppendHeader("Pragma", "no-cache");
Response.AppendHeader("Cache-Control", "no-cache");
string FilePath = (string)Session["fileLocation"];
if ( FilePath != null )
{
string FileName = Path.GetFileName(FilePath);
Response.AppendHeader("Content-Disposition", "attachment; filename="+FileName);
Response.WriteFile(FilePath);
Response.End();
}
}
PDF Session "fileLocation". , , , , Response.Redirect("BinaryData.aspx").
, PDF ( ).