Session Expires before Timeout

C

chamaratharanga

I have set the session timeout as 120 mins in the Global.asax. However
my session expires within about 5-10 mins at different pages. I used
"InProc" as the session state mode. Any help is appreciated.
 
N

Niraj Ranka

Hello,

Sorry i don't know the answer.. but can u let me know how can we set the
session timeout option in global.asax file.

The one option i knew was to set the sesstion timeout in web.config file.

Regards,
Niraj Ranka
 
M

Mark Rae

Sorry i don't know the answer.. but can u let me know how can we set the
session timeout option in global.asax file.

protected void Session_Start(Object sender, EventArgs e)
{
Session.Timeout = 20;
}
 
Joined
Jun 11, 2009
Messages
9
Reaction score
0
session expires

I found settings in IIS that affects session being lost if you are using In-Proc session state.

Right click on application pool -> properties

Recycling Tab -> "Recycle worker process (in minutes)" if this option is checked, make sure time set here should be the same as session timeout set in web.config

Performance Tab -> "Shutdown worker processes after being ideal for" Make sure time set here should be the same as session timeout set in web.config

Hope this resolves your issue.

Check this out patelshailesh.com/index.php/session-expires-before-timeout-value-specified-in-web-config
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,042
Latest member
icassiem

Latest Threads

Top