http://msdn.microsoft.com/en-us/magazine/cc301755.aspx
Seems like arrays - reference type, you should copy bytes into stream for example, only then remove your session object.
public ActionResult DownloadConfigurationFiles()
{
var bytes = this.HttpContext.GetSessionObj<byte[]>(idx_here);
if (bytes != null) // check existance
{
var target = new MemoryStream(bytes); // <-- don't use USING!
this.HttpContext.ClearSessionObj(idx_here);
return File(target, mime, file_name);
}
return HttpNotFound();
}
think it helps.