0
votes

My application is heavily dependent upon session variables. I am passing lots of ids through sessions e.g. Session["RecordId"] = myID. The problem is session gets expire in few minutes even tough I have increased the timeout of session variables. I have attempted to extend session expiry:

<sessionState mode="StateServer" cookieless="false" timeout="120"/>

I also tried to increase the timeout using IIS and Global.asax file. Is there any other way or I am doing something wrong?

1

1 Answers

0
votes

if really need mode to be StateServer where StateConnectionString

 <sessionState mode="StateServer"
  stateConnectionString="tcpip=SampleStateServer:42424"
  cookieless="false"
  timeout="20"/>

else you can use default mode value InProc

<sessionState mode="InProc" cookieless="false" timeout="120"/>