Asp – MVC lose session state

asp.net-mvc

Please forgive me for my poor English.
This is driving me crazy. I'm writing an application in ASP.NET MVC. Basically I have some pages which require to use session state. But now the session state loses after the following code:

Session["admin_ID"] = "aa27ec10-d9d4-43d9-96f6-7cfb0d5099ca";

After the following code, session states loses:

    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult GenerateVerifyModel(FormCollection formCollection)
    {
      ...
      return File(zipPath, "application/x-zip-compressed");
    }

Other code works very well and session state does not lose.

Any suggestion will be appreciated.

Best Answer

Shot in the dark: If you set something in the session and return a file, maybe the HTTP headers doesn't carry session's information... explaining the lost of the session on subsequent calls. But I would doubt it. Pretty hard to tell without a clearer scenario!

Thanks