0

I am using ASP state server for session management in my asp website. In one of my server I have two asp website. For one website i used tcpip=loopback:42424 and it works. For another website i wanted to use some other ports. I tried different ports in the range 30000 to 50000 and it does not work and get error like

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

But in my case asp state server is uses port of local machine only. So now how can i configure asp website to use different port for asp state server?

IT researcher
  • 3,274
  • 17
  • 79
  • 143
  • Have you changed the port on the server? AFAIK this can only be done by changing the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\Port ... – Mithrandir Jul 03 '14 at 09:16
  • @Mithrandir that registry value is set to 42424 (default value or port no). So what if i want to use two different ports for two asp websites? – IT researcher Jul 03 '14 at 09:47
  • I have never tired to run more than one instance of the state server on one machine. I don't know if that is possible. Since one service is bound to one port, i think you will not be able to do what you want to. – Mithrandir Jul 03 '14 at 09:52
  • @Mithrandir Ok. so can i use same port(42424) for two asp websites? – IT researcher Jul 03 '14 at 11:49
  • Ofcourse you can, that's the point of the state server. This server will manage the state for an arbitrary number of applications, as long as you don't run out of resources. – Mithrandir Jul 03 '14 at 11:51
  • @Mithrandir So if i use same port for two asp website then will it manage without any conflicts? – IT researcher Jul 03 '14 at 11:53
  • Indeed, it will! Again that is the point about the state server! If you choose to manage state in SQL Server, you don't need to use a different instance for each application either! – Mithrandir Jul 03 '14 at 12:00

0 Answers0