在asp.net应用程序会话状态ENABLESESSIONSTATE问题 [英] Session state enableSessionState issues in asp.net application
问题描述
我得到在生产环境中的以下错误
I get the following error in the production environment
当enableSessionState设置为true,无论是在配置文件中或在Page指令只能使用会话状态。还请确保System.Web.SessionStateModule或$自定义会话状态模块中的配置包含\\的System.Web \\的HttpModules应用程序中的配置部分。
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.
下面的事情我已经试过截至目前
The following things I have tried as of now
- 选中
的machine.config
和的web.config
,都具有ENABLESESSIONSTATE =真
- 新增
ENABLESESSIONSTATE =真正的
到的web.config页
- 状态模块也被添加在
<&的HttpModules GT;
部分 - 偶试过在页面指令设置
ENABLESESSIONSTATE =真正的
- Checked
machine.config
andweb.config
, both haveenableSessionState="true"
- Added
enableSessionState="true"
to pages inweb.config
- State module is also added in
<httpmodules>
section - Even tried setting
enableSessionState="true"
in page directive
请注意:当我尝试调试在开发环境中的code,一切都因为它应该工作正常。
Note: When I try to debug the code in Dev environment, everything works fine as it should.
谁能帮我获得过这个问题,我只是不能想出一个办法出来。
Can anyone help me out getting over this issue, I just can't figure out a way out of it.
推荐答案
什么是您的会话状态的配置是什么样子?你可能想被设置为使用进程内会话处理。
What does your session state config look like? You probably want to be set up to use inproc session handling.
<一个href=\"http://msdn.microsoft.com/en-us/library/ms178586.aspx\">http://msdn.microsoft.com/en-us/library/ms178586.aspx
这篇关于在asp.net应用程序会话状态ENABLESESSIONSTATE问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!