我已經在Google中研究過有關此錯誤的內容,但無法成功並最終在此處發佈。無法解析在所有DNN頁面中,EnableSessionState設置爲true錯誤
我已經下載了我的生活網站,數據庫並將其集成到我的本地環境中。我只能看到主頁,但無法看到其他頁面。我在所有其他頁面中都遇到了錯誤。
我認爲default.aspx是DNN的主頁,所以它工作正常,但沒有其他從DNN表動態呈現的頁面。
錯誤異常:
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.
事件日誌表中留言:
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 ---
我不得不採取在我的網絡配置文件從this link參考,並更新像下面,但我錯過了所有我的網站頁面也無法看到主頁。 EventLog表格顯示了我在我的問題中發佈的同樣的錯誤消息。
更新web配置象下面這樣:
<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" >