Session lost and application end, after file download
- by Amr ElGarhy
I have this code in the end of link button click:
Response.ContentType = "application/zip";
Response.AppendHeader("content-disposition", "attachment; filename=download.zip");
Response.TransmitFile(Server.MapPath("download.zip"));
Response.End();
to download a zip file from an aspx page.
In the previous page i set a session variable, after going to this download page and download the file, then press back i find the session=null "this happen after downloading more than 1 time", and the application_end in global.ascx called.
Do you know why this may happen??