I have a custom attribute class which inherits from AuthorizeAttribute
. Sometimes the parameter httpContext.Session
is null. How is this possible? The Session supposed to be alive as long as I am logged/active, right? I am not brwosing for 20 minutes or longer, in fact I am just browsing for 0-2 minutes and sometimes the Session property is null.
We have this bug since we are switched from MVC 2 (.NET 3.5) to MVC 4.5 (.Net 4.5) Is it possible that this is the cause of the problems?
How can I solve this?