147

Our site is currently having this problem. Basically it only happen when we click some particular links where it will pop-up a new window.
This is the error message we receive :

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.

target site :
Void MakeRequest(StateProtocolVerb, System.String, StateProtocolExclusive, Int32, Int32, Int32, Byte[], Int32, Int32, SessionNDMakeRequestResults ByRef)

this is the webconfig that contain sessionstate tag :

<sessionState mode="StateServer" timeout="45" />

I have check the ASP.NET State Service, and it is currently started and set to automatic

I have set the registry stated in the error message to 1, but still not working.

Liam
  • 27,717
  • 28
  • 128
  • 190

10 Answers10

356
  1. Start–> Administrative Tools –> Services
  2. Right-click on the ASP.NET State Service and click “start”

Additionally you could set the service to automatic so that it will work after a reboot

Hakan Fıstık
  • 16,800
  • 14
  • 110
  • 131
Jamshid Hashimi
  • 7,639
  • 2
  • 28
  • 27
30

If you need to change HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection to 1, remember to restart the ASP.net state service after you change the parameter.

hikkemikke
  • 309
  • 3
  • 2
  • @hikkenmikke How do you check and change HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection – Pomster Oct 16 '13 at 14:04
  • press Windows+R, then type "regedit", it will open the Windows Registry Editor. You can either search for "aspnet_state" key or navigate through the hierarchy (on the left panel) to find the right key – h_djebli Oct 12 '21 at 18:50
10

Check that:

stateConnectionString="tcpip=server:port"

is correct. Also please check that default port (42424) is available and your system does not have a firewall that is blocking the port on your system

Naveed Butt
  • 2,861
  • 6
  • 32
  • 55
mas_oz2k1
  • 2,851
  • 3
  • 34
  • 41
  • 1
    I have the same problem, Verified that my session state service is running correctly, but still get the same message. Here is my web.config setting: – lstanczyk Jun 20 '11 at 22:43
9

Type Services.msc in run panel of windows run window. It will list all the windows services in our system. Now we need to start Asp .net State service as show in the image.enter image description here

Your issue will get resolved.

Rinoy Ashokan
  • 1,501
  • 17
  • 14
6

One of my clients was facing the same issue. Following steps are taken to fix this.

 (1) Open Run. 

 (2) Type Services.msc

 (3) Select ASP.NET State Service

 (4) Right Click and Start it.
Hiren Parghi
  • 1,795
  • 1
  • 21
  • 30
3

Another thing to check is whether you have Windows Firewall enabled, since that might be blocking port 42424.

jwanagel
  • 4,078
  • 1
  • 25
  • 33
2

I've had the same issue when some ASP.NET installation was corrupted. In that case they suggest running aspnet_regiis -i -enable

Matthew Lock
  • 13,144
  • 12
  • 92
  • 130
2

I've found that some developers will for some reason define the server's private IP outside of IIS in an unexpected location, like a nonstandard config file (i.e. not web.config) or a text file. This can cause internal operation to fail even when the service is started, ports aren't being blocked, reg keys are correct, etc.

Kaseya, in particular, places a file called serveripinternal.txt in the root IIS directory of the VSA server. I've seen the text of your error when somebody running their own Kaseya instance changed the server's internal IP. The server will be reachable, IIS will respond, and the login page will come up - but login will fail with the cited message.

1

Not the best answer, but it's an option anyway:

Comment the given line in the web.config.

  • Definitely not the best answer but I got the above error while debugging locally in a locked-down environment which didn't allow me to start services. Removing mode="StateServer" allowed me to continue debugging and solved the error for my purposes. – VG8TS Sep 23 '21 at 11:46
0

I recently ran into this issue and none of the solutions proposed fixed it. The issue turned out to be an excessive use of datasets stored in the session. There was a flaw in the code that results in the session size to increase 10x.

There is an article on the msdn blog that also talks about this. http://blogs.msdn.com/b/johan/archive/2006/11/20/sessionstate-performance.aspx

I used a function to write custom trace messages to measure the size of the session data on the live site.

Ahmed Mansour
  • 527
  • 5
  • 13