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.

Web.config:

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

ここで何が欠けていますか?

4

0 に答える 0