Yes, you can execute the code at the end of the session. This is what Global.asa is for. In it, you can define actions for certain events, among which your session ends.
These are the events you can use:
- Application_OnStart
- Session_OnStart
- Session_OnEnd
- Application_OnEnd
, Session_OnEnd. sub Global.asa.
: http://www.w3schools.com/ASP/asp_globalasa.asp