Why is Session null in the constructors of Controllers? It can be accessed from Action methods. Presumably, because the MVC Routing framework is responsible for newing-up a
If you are using an IoC Container, try injecting and using the HttpSessionStateBase instead of the Session object:
private static Container defaultContainer()
{
return new Container(ioc =>
{
// session manager setup
ioc.For()
.Use(ctx => new HttpSessionStateWrapper(HttpContext.Current.Session));
});
}