Sessions Expiring Prematurely on Production

A

Andrew Chung

Hi all,

For an application that I'm working on, upon successful
authentication, Session.Timeout is set to 60 minutes. This behaviour
works as expected on my own machine. If I refresh a page after 40
minutes of inactivity, it remains, but after 61 minutes, it expires
and I am sent back to the login page.

However, once this code is put on the Production server, the sessions
time out after only 20 minutes, even though the code sets it to 60.
What could be causing this? The application is compiled before being
put on Production, in case that matters.

Thanks.
 
T

Teemu Keiski

In case sessions are set to use in-Proc mode, there can be various reasons
why it expires. AppDomain restarts would cause sessions to expire, and
AppDomain restart can happen when web.config is modified, bin folder
modified, or multiple files / directories are created etc etc, it can even
be a virus scanner touching some files.

See following posts for further information:
http://blogs.msdn.com/tess/archive/...variables-and-appdomain-recycles.aspx#1572598

http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx
 
G

Guest

In addition to what Teemu has said, are you sure that it's the Session timing
out and not the fact that the Forms Authentication Ticket may have expired?
Peter
 
A

Andrew Chung

In addition to what Teemu has said, are you sure that it's the Session timing
out and not the fact that the Forms Authentication Ticket may have expired?
Peter

I'm not using Forms Authentication, the Authentication is done
manually.
 
A

Andrew Chung

In addition to what Teemu has said, are you sure that it's the Session timing
out and not the fact that the Forms Authentication Ticket may have expired?
Peter

The authentication is done manually, Form Authentication is not used.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top