我有点困惑...我的web.config中有以下内容,我仍然收到错误消息。此错误仅在我登录时发生,因为用户信息在会话中。在未登录模式下,我只是获得空用户。
错误:
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.
的Web.config:
<sessionState mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="data source=MyServer;Initial Catalog=MyDatabase;user id=user;password=password" cookieless="false" timeout="20" />
我在这里缺少什么?