Session lost and application end, after file download

Posted by Amr ElGarhy on Stack Overflow See other posts from Stack Overflow or by Amr ElGarhy
Published on 2010-03-18T00:10:15Z Indexed on 2010/03/18 0:11 UTC
Read the original article Hit count: 829

Filed under:
|
|

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??

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about filedownload