Shiloh
Shiloh

Reputation: 1878

MVC 5 Session is Null

The session is always Null inside of my controller in MVC 5. Accessing it via Controller or HttpContext it is still null. I have read also read the post like the one below where you can add the sessionState module to the web config but that does not work for me. Any ideas?

System.Web.HttpContext.Current.Session


Controller.Session

ASP.NET MVC - Session is null

Upvotes: 0

Views: 2860

Answers (1)

Shiloh
Shiloh

Reputation: 1878

In the web.config the sessionState was set to Off. I changed it to InProc and the session is no longer null

Upvotes: 3

Related Questions