session expired

G

Green

Hi,
I have a question on how to deal with session expiration.
What i want to do is when the session variable expiration, i need to do
some database change. How can i do this?

I appreciate in advance.
 
K

Kevin Spencer

Use the Session_OnEnd event handler (in your global.asax class).

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
P

Patrice

Session_OnEnd but was know to be unreliable under ASP. Also it fires once
the timeout is reached (20 mn).

Other options are to do something when a window closes. My personal
preference is to see if I really need to perform real time housekeeping or
if it can be done as a background task (for example the SQL state server
uses a scheduled proc that runs every few minutes to clean up expired
session).

Patrice
 
K

Kevin Spencer

Session_OnEnd but was know to be unreliable under ASP. Also it fires once
the timeout is reached (20 mn).

Whatever you think you know about ASP, you can't apply it to ASP.Net, and
"unreliable" is a characterization. Can you define "unreliable" in terms of
behavior, results, anything factual?

Session_OnEnd has never fired ater 20 minutes. It has always (with both ASP
and ASP.Net) fired EXACTLY when the Session ends. That would be (be default)
20 minutes AFTER the last browser request from the client.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top