Increase session timeouts

  • Thread starter Thread starter Poppy
  • Start date Start date
P

Poppy

Is it possible for me to increase the time before a session times out and do
it in the global or webconfig files ?

In asp I used to put session.timeout = whatever in the session start event
of the global asa file.

TIA
 
Hi
you can either do it in web.config file Here the timeout "20" is in
minutes if u want u can change in to fit your requirement.

Web.Config

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

or in the session_start of global.asax

protected void Session_Start(Object sender, EventArgs e)
{
Session.Timeout = 20;
}

HTH
Regards
Ashish M Bhonkiya
 
Back
Top