StateServer mode ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers. In this article I will give you a step-by-step guide on how to use State Server Mode in your ASP applications.
Overview
StateServer mode stores session state in a process, that is regerred to as the the ASP.NET state service, It’s independent of the ASP.NET worker process or IIS application pool.
Getting Started
How to implement the state Server mode?
First, you must ensure that the service is running ASP.NET state services on the server that choose to store the sessions.
You must to set this on the web.config of your application:
- Set the mode attribute of the sessionState element to StateServer.
- Set the stateConnectionString attribute to tcpip=serverName:42424.
This example shows a configuration for StateServer mode:
<configuration> <system.web> <sessionState mode="StateServer" stateConnectionString="tcpip=SampleStateServer:42424" cookieless="false" timeout="20"/> </system.web> </configuration>
Objects stored in session state must be serializable if the mode is set to StateServer.
Information about availability on our servers: https://support.arvixe.com/index.php?/Knowledgebase/Article/View/143/11/aspnet-session-state
In conclusion, this session state mode allows session state will remain active if the application is restarted and make it available to multiple servers in a Web farm.
This concludes State Server mode in ASP.NET
Looking for quality Windows Hosting? Look no further than Arvixe Web Hosting!
Happy Hosting!
Rodolfo Hernandez
UPDATE 2015: I believe cookieless=”false: has been replaced with cookieless=”UseCookies” if user is deploying with Net 4.0 and above.
You are correct. This boolean mode “true” or “false” was probably deprecated
So if “false” and “true” values still work nowdays (for .NET framework 2.0 and above) I guess when you set “false” it assumes that will be used cookies for storing session identifier as UseCookies and “true” will assume that you don’t want to store cookies as UseUri. I will write an update this month.