架构师_程序员_码农网

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 7999|回复: 1

[ASP.NET] 解决【Unable to make the session state request to the session state server】

[复制链接]
发表于 2016-4-13 15:26:49 | 显示全部楼层 |阅读模式
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.



StateServer会话管理
将mode属性设为StateServer,也就是将会话数据存储到单独的内存缓冲区中,再由单独一台机器上运行
的Windows服务来控制这个缓冲区。状态服务全称是“ASP.NET State Service ”(aspnet_state.exe),
它由Web.config文件中的stateConnectionString属性来配置。该属性指定了服务所在的服务器,以及要监
视的端口:
<sessionState mode="StateServer"
stateConnectionString="tcpip=myserver:42424"
cookieless="false" timeout="20" />



错误原因:
ASP.NET State Service服务未启动。
解决办法:
Administrative Tools -> Services -> make ASP.NET State Service started.
建议将Startup type设置成Automatic(Delayed Start)


cmd管理员命令启动:netsh winsock reset








上一篇:c#各种输入格式验证
下一篇:asp.net获取服务器mac地址
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
 楼主| 发表于 2016-4-13 15:30:09 | 显示全部楼层
cmd命令应该是  net start aspnet_state
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

免责声明:
码农网所发布的一切软件、编程资料或者文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:help@itsvse.com

QQ|手机版|小黑屋|架构师 ( 鲁ICP备14021824号-2 )|网站地图

GMT+8, 2024-6-6 20:57

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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