Click here to Skip to main content
15,905,238 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Session variable expires Pin
hifiger200416-Oct-07 5:23
hifiger200416-Oct-07 5:23 
AnswerRe: Session variable expires Pin
kubben16-Oct-07 2:37
kubben16-Oct-07 2:37 
GeneralRe: Session variable expires Pin
hifiger200416-Oct-07 5:06
hifiger200416-Oct-07 5:06 
GeneralRe: Session variable expires Pin
kubben16-Oct-07 5:35
kubben16-Oct-07 5:35 
GeneralRe: Session variable expires Pin
hifiger200417-Oct-07 1:16
hifiger200417-Oct-07 1:16 
GeneralRe: Session variable expires Pin
kubben17-Oct-07 1:33
kubben17-Oct-07 1:33 
GeneralRe: Session variable expires Pin
hifiger200417-Oct-07 2:30
hifiger200417-Oct-07 2:30 
GeneralRe: Session variable expires Pin
kubben17-Oct-07 2:45
kubben17-Oct-07 2:45 
I have never set up a state server for the session state, but I don't think it is that hard. Still it is the right thing to do. Here is the Microsoft help on State server. It gives you all the details you need to set it up.

StateServer mode stores session state in a process, referred to as the ASP.NET state service, that is separate from the ASP.NET worker process or IIS application pool. Using this mode ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm.

To use StateServer mode, you must first be sure the ASP.NET state service is running on the server used for the session store. The ASP.NET state service is installed as a service when ASP.NET and the .NET Framework are installed. The ASP.Net state service is installed at the following location:

systemroot\Microsoft.NET\Framework\versionNumber\aspnet_state.exe

To configure an ASP.NET application to use StateServer mode, in the application's Web.config file do the following:

Set the mode attribute of the sessionState element to StateServer.

Set the stateConnectionString attribute to tcpip=serverName:42424.

Note
To improve the security of your application when using StateServer mode, it is recommended that you protect your stateConnectionString value by encrypting the sessionState section of your configuration file. For details, see Encrypting Configuration Information Using Protected Configuration.


The following example shows a configuration setting for StateServer mode where session state is stored on a remote computer named SampleStateServer:

Copy Code
<configuration>
<system.web>
<sessionstate mode="StateServer"
="" stateconnectionstring="tcpip=SampleStateServer:42424" cookieless="false" timeout="20">



Note
Objects stored in session state must be serializable if the mode is set to StateServer. For information on serializable objects, see the SerializableAttribute class.


To use StateServer mode in a Web farm, you must have the same encryption keys specified in the machineKey element of your Web configuration for all applications that are part of the Web farm. For information on how to create machine keys, see article 313091, "How to create keys by using Visual Basic .NET for use in Forms authentication," in the Microsoft Knowledge Base at http://support.microsoft.com.

Hope that helps.

Ben
GeneralRe: Session variable expires Pin
hifiger200417-Oct-07 3:14
hifiger200417-Oct-07 3:14 
GeneralRe: Session variable expires Pin
kubben17-Oct-07 3:17
kubben17-Oct-07 3:17 
AnswerRe: Session variable expires Pin
hifiger200419-Oct-07 7:02
hifiger200419-Oct-07 7:02 
GeneralRe: Session variable expires Pin
hifiger200416-Oct-07 5:23
hifiger200416-Oct-07 5:23 
QuestionSharepoint server 2007 Pin
nompat15-Oct-07 22:39
nompat15-Oct-07 22:39 
AnswerRe: Sharepoint server 2007 Pin
SHatchard16-Oct-07 21:31
SHatchard16-Oct-07 21:31 
QuestionLooking for a Javascript Example... Pin
Bhicken7815-Oct-07 10:44
Bhicken7815-Oct-07 10:44 
AnswerRe: Looking for a Javascript Example... Pin
led mike15-Oct-07 11:06
led mike15-Oct-07 11:06 
AnswerRe: Looking for a Javascript Example... Pin
Elizma16-Oct-07 1:53
Elizma16-Oct-07 1:53 
QuestionWeb Service -DLL bound deployment Pin
Bob Enein15-Oct-07 5:18
Bob Enein15-Oct-07 5:18 
Questionasp:CustomValidator Control Pin
Brendan Vogt14-Oct-07 23:57
Brendan Vogt14-Oct-07 23:57 
AnswerRe: asp:CustomValidator Control Pin
Christian Graus15-Oct-07 0:17
protectorChristian Graus15-Oct-07 0:17 
QuestionClient FTP Error Code 12029 Pin
dev2414-Oct-07 22:10
dev2414-Oct-07 22:10 
QuestionSearch Feature [modified] Pin
saaiman14-Oct-07 21:11
saaiman14-Oct-07 21:11 
AnswerRe: Search Feature Pin
pmarfleet14-Oct-07 21:51
pmarfleet14-Oct-07 21:51 
GeneralRe: Search Feature Pin
saaiman15-Oct-07 21:09
saaiman15-Oct-07 21:09 
GeneralRe: Search Feature Pin
pmarfleet15-Oct-07 22:07
pmarfleet15-Oct-07 22:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.