4

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?

3 Answers 3

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>
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

1
  • This probably does the job, but the following command could also fix this: Enable-SPSessionStateService -DefaultProvision
    – moe
    Aug 6, 2014 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.