将enableSessionState设置为true [英] set enableSessionState to true

查看:94
本文介绍了将enableSessionState设置为true的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

This is what is shown in my the design mode of visual studio for a page of my web site project:
"menuPageSession 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."
So this the line i add to my web.config file:
<pages buffer="true" enableSessionState="true"></pages>
    <httpModules>
      <add type="System.Web.SessionState.SessionStateModule" name="Session"/>
    </httpModules>
Under the "system.web"  tag, but the problem still persist

推荐答案

以下是有助于您解决问题的答案: http://geekswithblogs.net/intermark/archive/2009/09/06/hellipsession-state-can-only-be-used-enablesessionstate-is-set.aspx [
Here is an answer that will help: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive..........[^]

There is also the rarer problem that this guy solved: http://geekswithblogs.net/intermark/archive/2009/09/06/hellipsession-state-can-only-be-used-when-enablesessionstate-is-set.aspx[^]


这篇关于将enableSessionState设置为true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆