is session.end fired always?

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I am using asp.net 2.0 and trace session.start and session.end. Sometimes I
found that session.end is not catched. Is it a normal behavior, or why it
happens?
 
from MSDN:
The Session_OnEnd event is only supported when the session-state
HttpSessionState.Mode property value is InProc, which is the default. If the
session-state Mode is set to StateServer or SQLServer, then the Session_OnEnd
event in the Global.asax file is ignored. If the session state Mode property
value is Custom, then support for the Session_OnEnd event is determined by
the custom session-state store provider.
 
I am using asp.net 2.0 and trace session.start and session.end. Sometimes
I
found that session.end is not caught. Is it a normal behavior, or why it
happens?

Session End fires only for inproc sessions...

Session End does not fire when a user closes the browser because the server
cannot detect that...
 
The event fires when the server Session ends. That can be quite awhile (by
default, 20 min. after the last Request from the client). Perhaps you are
shutting down your app before it fires.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
 
Hi Michael,

Yes, session _end event will not get fired for some certain cases. In
addition to other's comments, I think the following FAQ article is very
good, you can have a look for more ideas(include the session_end event
behavior):

#Understanding session state modes + FAQ
http://forums.asp.net/p/7504/7504.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: (e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 
Back
Top