Why my session expires? And will a sessionID survive...?

  • Thread starter Thread starter Welman Jordan
  • Start date Start date
W

Welman Jordan

Hello all,

In Session_OnStart, I set a session variable:

Session["LogInTime"] = DateTime.Now;

and

Session.Timeout = 15;

Then the user begin to browse around ASPX pages.
In those pages, Session["LogInTime"] is queried
and displayed, but not modified, and no more
Session variable is created.

About 15 minutes after LogInTime, the session
expires and then the LogInTime get renewed, even
though the user are still hitting ASPX pages.
What can I do to prevent this session from
expiration? (InProc mode)

.....

And by the way, may I ask that whether the same
SessionID is used if the Session is not yet expired
on the client side, but the application on the
server got recycled or restarted? I know that
everything inside the Session variable collection
will be lost, but will the SessionID survive in
this way??

Jordan
 
you can configure the session timeout in IIS. although to be able to
continue with sessions you may need to consider along the lines of
setting up a state server
 
hi,

Thank you for your reply!
^_^

: hi,
:
: ya sessionId Remains same after session
: (if browser is not closed...)
:
:
: --
: Thanks and Regards,
:
: Amit Agarwal
: Software Programmer(.NET)
: : > Hello all,
: >
: > In Session_OnStart, I set a session variable:
: >
: > Session["LogInTime"] = DateTime.Now;
: >
: > and
: >
: > Session.Timeout = 15;
: >
: > Then the user begin to browse around ASPX pages.
: > In those pages, Session["LogInTime"] is queried
: > and displayed, but not modified, and no more
: > Session variable is created.
: >
: > About 15 minutes after LogInTime, the session
: > expires and then the LogInTime get renewed, even
: > though the user are still hitting ASPX pages.
: > What can I do to prevent this session from
: > expiration? (InProc mode)
: >
: > ....
: >
: > And by the way, may I ask that whether the same
: > SessionID is used if the Session is not yet expired
: > on the client side, but the application on the
: > server got recycled or restarted? I know that
: > everything inside the Session variable collection
: > will be lost, but will the SessionID survive in
: > this way??
: >
: > Jordan
: >
: >
:
:
 
Back
Top