无法向会话状态服务器发出会话状态请求,并且服务器正在运行

时间:2014-08-27 15:05:29

标签: asp.net asp.net-mvc-4 iis aspstate

我随机收到以下错误,有时会有效,但有时会失败

  

无法向会话状态服务器发出会话状态请求。   请确保ASP.NET状态服务已启动并且确实已启动   客户端和服务器端口是相同的。如果服务器在远程服务器上   机器,请确保它通过检查接受远程请求   的价值   HKEY_LOCAL_MACHINE \系统\ CurrentControlSet \服务\ aspnet_state \参数\ AllowRemoteConnection。   如果服务器在本地计算机上,如果之前提到过   注册表值不存在或设置为0,然后是状态服务器   连接字符串必须使用' localhost'或者' 127.0.0.1'作为   服务器名称。

我在Web.config中的sessionState配置如下:

<sessionState cookieless="UseCookies" mode="StateServer" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" stateConnectionString="tcpip=127.0.0.1:42424" timeout="20" />

我已经仔细检查了ASP.NET状态服务器是否已启动&amp;运行即可。此外,我还检查过ASP.NET状态服务器是否在端口42424上运行。事实上,有时候工作。我的IIS应用程序池是.NET 4集成管道。

我还检查了this article from Microsoft,建议增加stateNetworkTimeout。但似乎对我来说不是一个好的解决方案,因为服务器没有负载很重。

当我转到事件查看器时,我看到以下警告:

Event code: 3009 
Event message: Unable to make the session state request to the session state server. Details: last phase='Sending request to the state server', error code=0x80072749, size of outgoing data=0 
Event time: 8/27/2014 4:38:04 PM 
Event time (UTC): 8/27/2014 2:38:04 PM 
Event ID: 848eadc753cf4e99aee72824d1d7fc85 
Event sequence: 239 
Event occurrence: 12 
Event detail code: 50016 

Application information: 
    Application domain: /LM/W3SVC/2/ROOT/download-7-130536222982810000 
    Trust level: Full 
    Application Virtual Path: /download 
    Application Path: C:\inetpub\vhosts\plasticscm.com\httpdocs\download\ 
    Machine name: main 

Process information: 
    Process ID: 4124 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 

Exception information: 
    Exception type: HttpException 
    Exception 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.

我可以做些什么来进一步调查此事?

0 个答案:

没有答案