电脑计算机论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1752|回复: 0

Unable to make the session state request的解决办法

[复制链接]
admin 发表于 2012-7-4 18:23:26 | 显示全部楼层 |阅读模式
页面打开时,出现如果下错误.处理方法.或者登陆后不久,频繁的返回到了登录界面
登录Server Error in '/' Application.
--------------------------------------------------------------------------------

Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.
开启ASP.NET State Service服务,把它设成自动。再在web.config中的<system.web>下加一行<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" timeout="20"/>,如下
一、开启ASP.NET State Service服务:
选择管理工具->服务,找到ASP.NET State Service,点开后选择启动,并将启动类型设为自动。
二、设置程序配置文件:
将web.config打开,会看到有一行是<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" timeout="20"/>,如果没有,请在<system.web>的下一行添加,再将其中的InProc改为StateServer,保存即可。
您需要登录后才可以回帖 登录 | 注册

本版积分规则


QQ|手机版|小黑屋|电脑计算机论坛 ( 京ICP备2022023538号-1 )

GMT+8, 2024-11-23 23:55 , Processed in 0.124683 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表