session expired

  • Thread starter Thread starter Green
  • Start date Start date
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.
 
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
 
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
 
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
 
Back
Top