Are Controller.Session
and HttpContext.Current.Session
the same objects? The matter is when I used HttpContext
everything was OK but session data were lost in some minutes after putting values into HttpContext.Current.Session
despite <sessionState timeout="9999" />
.
But when I changed code to use Controller.Session
everything appeared to be good.
Asked
Active
Viewed 3,507 times
0

Sergey Metlov
- 25,747
- 28
- 93
- 153
-
1check this question - http://stackoverflow.com/questions/940742/difference-between-session-and-httpcontext-current-session and this one - http://stackoverflow.com/questions/5447611/why-are-there-two-incompatible-session-state-types-in-asp-net – Dmitry Khryukin Jul 23 '12 at 22:54
-
@BurundukXP, thank you. Can't believe I didn't find them before – Sergey Metlov Jul 23 '12 at 22:58