is session.end fired always?

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?
 
M

Misbah Arefin

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.
 
M

Mark Rae [MVP]

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...
 
K

Kevin Spencer

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
 
S

Steven Cheng

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.


--------------------
From: =?Utf-8?B?TWljaGFlbA==?= <[email protected]>
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
 

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

Members online

Forum statistics

Threads
474,178
Messages
2,570,955
Members
47,509
Latest member
Jack116

Latest Threads

Top