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

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
 
B

Bijoy Thulasidharan

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
 
W

Welman Jordan

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
: >
: >
:
:
 

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

Top