Asp – Keep getting The provider requires SessionState to be enabled on IIS 6

asp.net-mvciis-6net

While trying to deploy a simple asp.net mvc project on an IIS 6 server, I keep getting this error "The provider requires SessionState to be enabled".

To rule out that I am doing something wrong, I am now trying to deploy just the template you get when you start a new asp.net mvc solution in vs2008. And yes, I have enabled session state in IIS config, also added the <sessionState mode="InProc" /> line to web.config, but that didn't make any difference.

Tried both the .mvc isapi mapping, as well as the wildcard mapping, and I still get the dreaded error message.

Am I overlooking something obvious ?

Best Answer

Check your web.config and check make sure that you don't have anything disabling session state. It would look like this.

<sessionState mode="Off" />

Otherwise you may want to check and make sure you have session state enabled at the IIS level by...

  1. Click/select your site
  2. In the Application Settings area select Configuration and then Options tab.
  3. In the Application Configuration area select Enable Session State checkbox (or make sure it's checked).