Link to home
Start Free TrialLog in
Avatar of bujjigadu
bujjigadu

asked on

Session state can only be used when enablesessionstate is set to true

I got the following error when I try to load aspx page which is loading user control (ascx)
I'm trying to set a session variable in my user control and I get the below error over that step.

I did page enabled =true on my aspx page, web.config and checked IIS the ASP.Net session is enabled. What else can be checked.

I have like this in my web.config file -

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


ERROR I GOT -

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 <configuration>\<system.web>\<httpModules> section in the application configuration.
SOLUTION
Avatar of ShareD_Point
ShareD_Point

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial