Wednesday, March 1, 2017

System.Web.HttpException: 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.

To fix this issue we have to do two changes in web.config file.

First open the web.config file from "C:\inetpub\wwwroot\wss\VirtualDirectories\" Web application Folder"".


  1.  Add the below code on module section.

<add name="Session" type="System.Web.SessionState.SessionStateModule" />




  1. Modify   enableSessionState = "false" to enableSessionState = "true" under pages section as below
<pages enableSessionState="true" enableViewState="true" viewStateEncryptionMode="Always" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">


No comments:

Post a Comment