I have already research in Google about this error but couldn't succeed and finally posted here.
I have downloaded my live website, database and integrate it in my local environment. I can only see Home Page but not able to see other pages. I’m facing below error in my all other pages.
I think default.aspx is the home page in DNN so it is working fine but not other pages which are render dynamically from DNN tables.
Error Exception:
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.
Event Log Table Message:
DotNetNuke.Services.Exceptions.PageLoadException: 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. ---> 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 <configuration>\<system.web>\<httpModules> section in the application configuration. at System.Web.UI.Page.get_Session() at DotNetNuke.Framework.CachePageStatePersister.Save() at System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) at System.Web.UI.Page.SaveAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
I had take reference from from this link and update like below in my web config file but I missed all pages of my website and does not able to see Home Page also. EventLog table showing me same error message as I posted in my question.
Update web config like below:
<modules runAllManagedModulesForAllRequests="true">
<remove name="Session" />
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
...
<httpModules>
<add name="Session" type="System.Web.SessionState.SessionStateModule" />
...
<pages validateRequest="false" enableViewStateMac="true" enableEventValidation="false" viewStateEncryptionMode="Always" enableSessionState="true" >