我有一個應用程序,其中我訪問駐留在App_Code文件夾中的CommonCode.cs文件中的會話對象。但是,當會話對象訪問的應用程序會引發我一個錯誤:堅持啓用會話狀態
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.
現在我已經啓用在Web.config文件中的會話狀態屬性,這裏是從web.config文件我的代碼:
<pages enableSessionState="true" autoEventWireup="true">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
我不明白爲什麼我仍然得到那個錯誤! 請幫忙!
非常感謝。