5

I have a SharePoint Web Application https://xyz.abc.net/sites/mob_portal with its Mobile Site URL as: https://xyz.abc.net/sites/mob_portall?Mobile=1

The normal site is working fine but when I open the mobile site URL I get the below error:

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration.

Can you please advise?

Phil Greer
  • 2,287
  • 9
  • 21
  • 23
Suraj Azad
  • 51
  • 1
  • 3

3 Answers3

3

goto the webapplication web.config and search for enableSessionState and set it to true.

also make sure you have the moduel:

<httpModules> 
    <add name = "Session" type = "System.Web.SessionState.SessionStateModule" /> 
</httpModules>
Ali Jafer
  • 17,808
  • 1
  • 27
  • 41
2

Set EnableSessionState=true in webapplication web.config file like :

  <pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7"> 

Also enabled session state from the web config by adding the http module

priyanka gupta
  • 256
  • 1
  • 2
  • 1
    This probably does the job, but the following command could also fix this: Enable-SPSessionStateService -DefaultProvision – moe Aug 06 '14 at 12:28
2

As a solution you must register session state handler module in IIS.

  1. Open Internet Information Services manager.
  2. Move to site where problem occurred.
  3. Open modules list of this site.
  4. Add session state handler like show on the following image (click on it):

enter image description here 5. Click OK, recycle application pool and refresh the page.

Mikhail Zhuikov
  • 614
  • 1
  • 6
  • 19