0

我有点困惑......我的 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.

网络配置:

<sessionState mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="data source=MyServer;Initial Catalog=MyDatabase;user id=user;password=password" cookieless="false" timeout="20" />

我在这里想念什么?

4

0 回答 0