I am doing ajax call to asp.net mvc action(it is name SearchResults action)
In SearchResults action I set a session
context.Session["FlightSearchRequest"] = flightSearchRequest;
and then Redirect To another Action
return RedirectToAction("GetAvailableFlights");
In GetAvailableFlights action I want to access session
return context.Session["FlightSearchRequest"] as FlightSearchRequest;
But it is null
I think my session lost but why?I want to debug this
I added
protected void Session_End(object sender, System.EventArgs e)
{
}
to global.asax but it is not fired...When my session get null I want catch this what should I do ?