Re: How to end a session when the user closes the browser?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Lionel LASKE (llaske_at_c2s.fr)
Date: 02/01/05


Date: Tue, 1 Feb 2005 09:34:28 +0100


Unfortunatly, nothing happens on the server when the browser is closed.
I'm afraid that you can't close the session without waiting the timeout and
the "Session_End" event.

                            Lionel.

"news.microsoft.com" <babupalladium1@yahoo.com> a écrit dans le message de
news: uBWhueDCFHA.468@TK2MSFTNGP15.phx.gbl...
> Hi everyone,
>
> I need some help (may be in the form of some sample code) for the subject
> question.
>
> I have an ASP.NET/C# application. I need to do quite a few tasks when the
> session ends. I don't want to depend on the session timeout factor since
> it may end too soon or it may hang around too long. I can't find any
> event that fires when the browser closes. The Session_End event handler
> in the Global.asax does not execute until the timeout value expires.
> Also, when it does execute the Session_end, it seems that the session has
> already ended and so, I have no access to any of the session variables I
> was holding onto.
>
> Can anybody tell me the server side sequence of events and their handlers
> that get called when the user closes a browser? Does the browser inform
> the server that it is closing, so that I can do my cleanup?
>
> Any help is highly appreciated.
>
> Babu.
>
>



Relevant Pages

  • Re: ASP sessionstate
    ... :>: so it is a clientside issue. ... ASP doesn't know or care what browser it ... but then it is not a new session. ... :> How can a Response.Write write to the server screen? ...
    (microsoft.public.inetserver.asp.general)
  • Re: ASP sessionstate
    ... ASP doesn't know or care what browser it ... ticket number given when the first item is added to the cart. ... How can a Response.Write write to the server screen? ... :> delete the cart file and set the session ...
    (microsoft.public.inetserver.asp.general)
  • Re: Attempt to de-mystify AJAX
    ... >>maintaining a session via URL is not a problem. ... >> around cookies and JS, but it seems to be tough. ... >> as needed back to the server. ... but as I mentioned before - a non-dynamic request by the browser can ...
    (comp.databases.pick)
  • "Compaq Web Agent" management session can be re-used without the need to perform authentic
    ... destructive actions (as server reboot). ... Compaq Web Agent Service 6.0.0.0 using Compaq HTTP Server 5.1.0 on ... servers via a secured HTTP session from a browser client, ... via a legitimate authenticated SSL session - if he closes the session by ...
    (Bugtraq)
  • Re: Event ID 538 Logon Type 3 NT AUTHORITY/ANONYMOUS LOGON
    ... The browser service is just one and the most common use of null sessions. ... >> create a null session. ... >> server for successful anonymous logoff which indicates that these events ...
    (microsoft.public.win2000.security)