Asp – The SessionStateTempDataProvider requires SessionState to be enabled

asp.net-mvc

HI i am getting error : "The SessionStateTempDataProvider requires SessionState to be enabled."
when i try to handle the error.
i got a piece of code from the blog below.
http://blogs.microsoft.co.il/blogs/shay/archive/2009/03/06/real-world-error-hadnling-in-asp-net-mvc-rc2.aspx
i am not using any session. my session state is set to off in web.config.

and from the below thread
The SessionStateTempDataProvider requires SessionState to be enabled
i got a solution to set the
but its already set as such.
how to avoid the error. i dont want to use session.

Best Answer

my session state is set to off in web.config.

That should be what's causing the problem. Apparently, ASP.NET MVC needs the session state.

Check this question about disabling session state.