Unable to make the session state request to the session state server

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.

web.config
<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="20"/>

 

 

该是跟你的在线用户数量相关。
使用StateServer的时候,哪怕它是在本地,也会建立一个TCP连接用来ASP.NET与StateServer的通讯。

当用户访问量很大的时候,TCP连接就无法建立起来。默认情况下在Windows 2003上面用来建立TCP连接的动态端口范围1024-5000。

为了确认这个问题,你可以在问题发生的时候运行"netstat -ano",看一下端口是否已经用到接近5000了。一旦确认是这个问题之后,根据http://support.microsoft.com/kb/196271得提示把MaxUserPort改大一些,比如10000

posted on 2015-05-06 22:55  西湖浪子  阅读(1602)  评论(0)    收藏  举报