Re: Session_End
- From: "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 23 May 2006 06:36:40 -0400
HTTP is stateless. Once a request for a page is received by the server, the
request is handled and then forgotten. There is no persistent connection
between the server and the client. Session is memory on the server. It is
identified with a client application (such as a browser instance) by passing
data back and forth to and from the client with each Request/Response. By
default this happens using a Session cookie It can also be passed via
QueryString.
In any case, the first client visit to a web app initiates a Session on the
server, and the Session Cookie is passed to the client, so that the client
can re-link to his/her Session with each successive Request.
Since there is no such thing as a notification that the client is finishes,
in order to preserve memory on the server, there must be a mechanism for
de-allocation unused Session memory. This is done by means of a timeout that
is re-set with each successive Request from the same client. If no Requests
are made within the timeout period, the Session expires, and the next
request from the same client will initiate a new Session.
Therefore, there is only one way to know when a Session ends: when it times
out.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
The man who questions opinions is wise.
The man who quarrels with facts is a fool.
"news.microsoft.com" <me@xxxxxxxx> wrote in message
news:e1d$YDlfGHA.4304@xxxxxxxxxxxxxxxxxxxxxxx
I am reposting this because the person who replied to my original post did
not understand me. Please dont post a reply unless you 'absolutley ' know
what I am talking about and have a solution or an absolute reason why there
is no solution.
I want to log when a user logs off, so I wanted to use the session_end
event. This 'Does Fire' when the session expiry ends for the current
session. However, this event seems to fire 'After the session has ended'
and not just before it expired and hence, there seems to be no way to
determine who's session is ending.
I may be wrong in my assertion, if I am please correct me , give me a
workaround or simply explain why I cant do what I want to here.
Remember, if you dont know, please dont reply
Many Thanks
.
- Follow-Ups:
- Re: Session_End
- From: news.microsoft.com
- Re: Session_End
- References:
- Session_End
- From: news.microsoft.com
- Session_End
- Prev by Date: Re: ASP.NET 2.0: static instance of reference type is not always set to null
- Next by Date: error: Data source is an invalid type
- Previous by thread: Session_End
- Next by thread: Re: Session_End
- Index(es):
Relevant Pages
|
Loading