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?
Misbah Arefin - 06 Mar 2008 09:21 GMT
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.

Signature
Misbah Arefin
https://mcp.support.microsoft.com/profile/MISBAH.AREFIN
http://www.linkedin.com/in/misbaharefin
> 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?
Mark Rae [MVP] - 06 Mar 2008 09:21 GMT
> 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...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Kevin Spencer - 06 Mar 2008 12:15 GMT
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.

Signature
HTH,
Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
>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?
Steven Cheng - 07 Mar 2008 01:28 GMT
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: msdnmg@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?TWljaGFlbA==?= <Michael_MSDN@noemail.noemail>
>Subject: is session.end fired always?
>Date: Wed, 5 Mar 2008 23:58:00 -0800
>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?
Michael - 07 Mar 2008 01:38 GMT
Thanks to everyone for your tips. I will read more for this event. :)
> Hi Michael,
>
[quoted text clipped - 32 lines]
> >found that session.end is not catched. Is it a normal behavior, or why it
> >happens?