2

I'm getting the following error randomly, sometimes works, but sometimes it fails:

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.

My sessionState configuration in the Web.config is the following:

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

I have double-checked that the ASP.NET state server is up & running. Also I've checked that the ASP.NET state server is running on port 42424. In fact, sometimes work. My IIS application pool is .NET 4 integrated pipeline.

I have also checked this article from Microsoft, that suggest to increase the stateNetworkTimeout. But seems not to be a good solution for me since the server is not under heavy load.

When I go to the event viewer, I see the following warnings:

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.

What things can I do to further investigate this?

halfer
  • 19,824
  • 17
  • 99
  • 186
Daniel Peñalba
  • 30,507
  • 32
  • 137
  • 219
  • 3
    I have this same issue. Most of the time it works fine, but every now and then the request fails and the state server restarts, causing future requests to have to wait upwards to a minute or more before the site starts serving up pages again. – Kcoder Jun 03 '15 at 23:34
  • 1
    @Kcoder: I finally changed the session state to be inside the application ... ugly but effective. – Daniel Peñalba Jun 04 '15 at 07:48
  • Thanks for following up. Can you elaborate a little more on what you mean? Did you simply switch from using a state server to inproc? What's really odd is that my application has these intermittent state server issues on Dev and Production environments only but Stage and QA work perfectly. – Kcoder Jun 11 '15 at 17:24
  • 1
    @Kcoder: I setup InProc session state mode: https://msdn.microsoft.com/en-us/library/ms178586(v=vs.140).aspx – Daniel Peñalba Jun 12 '15 at 07:45

0 Answers0