加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

间歇性ASP.Net状态服务错误

发布时间:2020-12-16 07:01:00 所属栏目:asp.Net 来源:网络整理
导读:我们在虚拟机上托管ASP.net网站. ASP.net会话状态服务正在运行.但是,我们每隔一段时间就得到以下异常: Message: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and tha
我们在虚拟机上托管ASP.net网站. ASP.net会话状态服务正在运行.但是,我们每隔一段时间就得到以下异常:

Message: 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_MACHINESYSTEMCurrentControlSetServicesaspnet_stateParametersAllowRemoteConnection.
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.

我已经验证会话状态服务正在运行,并且它正在尝试连接到本地主机:

<sessionState mode="StateServer" 
stateConnectionString="tcpip=127.0.0.1:42424" timeout="100"/>

在我的研究中,我遇到了以下论坛帖子:
http://forums.asp.net/t/1409990.aspx

但除了尝试在SQL模式下运行会话状态之外,没有任何关于此问题的解决方案.

TL; DR:获取会话状态服务错误,说明服务没有响应,即使该服务在同一台计算机上运行.

解决方法

经过大量的调试后,我发现我们的一位开发人员试图通过将其保存到两个特定页面的会话中来改善视图状态性能.当用户达到大约20个不同的视图状态集时,会话服务变得过载,并开始剥落.

我已将页面修改为不再需要视图状态,并且未发生此异常.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读