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

标签 asp.net .net session iis

我们在虚拟机上托管 ASP.net 网站。 ASP.net session 状态服务正在运行。然而,我们时不时地会遇到以下异常:

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_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.

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

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

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

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

TL;DR: 收到 session 状态服务错误,表示服务没有响应,即使该服务在同一台计算机上运行也是如此。

最佳答案

经过大量调试后,我发现我们的一位开发人员试图通过将 View 状态保存到两个特定页面的 session 中来提高 View 状态性能。当用户达到大约 20 组不同的 View 状态时, session 服务就会过载,并开始崩溃。

我已将页面修改为不再需要 View 状态,并且没有发生此异常。

关于asp.net - 间歇性 ASP.Net 状态服务错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19817423/

相关文章:

python - 在 Django : how to renew expiry date for current session?

php - 添加到 $_SESSION 中的数组

java - 默认情况下 session 持续多长时间?

c# - 在日历控件中自定义选择

javascript - 排序和过滤器不起作用 - Ngtable

c# - 确定数字是否在二进制序列中 1 2 4 8 16 32 64 等

c# - 使用 .NET 的单个命令将 SQL INSERT 和 SELECT 插入 Oracle

asp.net 文件重命名

asp.net - 从 ASP.NET 获取动态创建的标签 (jQuery)

.net - .NET 中的对象关系映射器和存储过程的使用