Session_End

G

Guadala Harry

Just wondering if Session_End *always fires* for every Session. I know that
IIS times out sessions after a default 20 min (unless changed) and there's
no way to know when a user actually closed a browser (unless I provide a
"log out" button that kills the session explicitly, and we can't guarantee
the user will click on that). What I am wondering if there are there
well-known/documented circumstances under which Session_End will NOT fire
(regardless of what the user is doing/not doing in the browser)?

Thanks.

-GH
 
G

Guest

Hi Harry,

I was not able to trace what exactly you are looking out, but what i
assume from your post is that you need scenario's where the Session_End will
not be fired.
And the answer to this is, The Session_End will not be fired if your session
is not running in the same process with the IIS as the browser generates the
session's with the help of IIS. which is the web server. The best example i
can give is In the web.config set the Session MOde as StateServer or
SQLserver and write some code in the Session_End the Session_End will not be
fired.
 
G

Guadala Harry

Actually - just the opposite - I would like to have some code that executes
when *any/every* session ends. There would be no point in writing that code
if I could not be sure (as much as anything can be certain in a computer)
that Session_end would fire for every session end. So, asking about the
known cases where session_end does not fire - if there are any such
well-known cases - would give me an idea of whether or not to proceed with
writing the code. E.g., if there were 2 or 3 scenarios where it does not
fire, but they are not relevant to my application - then I'd go ahead and
write the code. Just wondering what those scenarios would be if there are in
fact any such scenarios.

So from your response, it appears that session_end is expected to always
fire under normal circumstances (nothing special for state server, etc).
Correct?

GH
 
P

Patrice

Application recycled likely.

I would see things the other way round :
- do I have to use Session_End ? If not I avoid it.

For example the SQL Server session state provider uses a job to perform
housekeeping tassks in the DB regularly...

Patrice
--
 

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

Similar Threads

Session_End 14
Session_End 4
Session_End event, System.NullReferenceException 1
Session_End() 1
Session_End questions 3
Session_End? 2
Global.asax: Session_End() Behavior 12
global.aspx and session_end event 8

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top