Last post Apr 01, 2011 08:45 AM by chalakiblog
Mar 29, 2011 04:59 AM|kylito|LINK
My application started throwing the following sesion state exception on regular basis. I am trying to find a solution by changing Session Sate Mode but the error remains. The application is on a shared hosting plan and currently i am using
the State Server Mode.
Do you think the in proc mode will solve the issue?
Is this error related to limited resources from my shared hosting plan?
Other possible causes? (Excessive use of ASP.NET caching probably or heavy loaded pages?)
Error 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.
Mar 29, 2011 05:18 AM|rishialagesan|LINK
Changing from State server mode to In proc wont solve the issue, if your requirement is to store session in the state server (SQL server for ex).
Please check your session state configuration is done properly.
Here are some links to help you.
Apr 01, 2011 03:16 AM|Wenchao Zeng - MSFT|LINK
The exception message says that it can't connect to the State Server or the State Server is unavailable. Please make sure the configuration
is correct by referring to
Session-State Modes. It might look like:
SampleStateServer name might be the IP address of your server or
And also please check with your service provider whether
State Server Service is available on your server or not. If State Server is unavailable, you could consider
SQL Server Mode by asking them if the server can support this mode.
Otherwise, you might want to implement your own
Session-State Store Provider since In-Proc Mode is a bit unstable especially for a shared hosting plan. Please see
Implementing a Session-State Store Provider and
Sample Session-State Store Provider.
Apr 01, 2011 06:46 AM|castlehills|LINK
In a shared hosting scenario, the in-proc session management should work. It is stable as long as the hosting company is a reputable company. Some companies restart the iis without asking you, so that can cause issues to your users.
Your problem seems to be related to the unavailibility of the state server.
Apr 01, 2011 06:54 AM|asheejtk|LINK
I doubt this is occuring because of excessive caching but it Seems like the problem with your state server and it is not reachable sometimes.
Inproc session state should work fine as long as you are hasting in a trusted hosting server
Apr 01, 2011 08:45 AM|chalakiblog|LINK
Looks like this is a intermittant problem, related to availability of the state server. May be the load is high on that state server. Change it to Inproc if your app is not too big and traffic per day is reasonable. I use a shared hosting plan and with InProc,
i support 2000 visitors/day without an issue.