Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > session not being killed after user closes browser

Reply
Thread Tools

session not being killed after user closes browser

 
 
Rafael Chemtob
Guest
Posts: n/a
 
      02-11-2004
Hi,
I'm using session cookies on my web app and it looks like the session is not
being killed when the user closes the browser. We use a Global.asa file on
our app. Do we have to explicitly write to close the session or does it get
killed when the user is closes their browser?

Please advise.
rafael


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      02-11-2004
Rafael Chemtob wrote:
> Hi,
> I'm using session cookies on my web app and it looks like the session
> is not being killed when the user closes the browser. We use a
> Global.asa file on our app. Do we have to explicitly write to close
> the session or does it get killed when the user is closes their
> browser?
>
> Please advise.
> rafael


The server does not "know" when a user closes his browser, so it cannot kill
a session when that occurs. there are only two situations where the server
will kill a session:

1. A page issues a Session.Abandon command
2. The session times out

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
 
Vilmar Brazão de Oliveira
Guest
Posts: n/a
 
      02-12-2004
hi,
is there a possibility of doing this on unload event of window, use
session.abandon method?
thanks,

--
««««««««»»»»»»»»»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
"Bob Barrows [MVP]" <> escreveu na mensagem
news:#...
> Rafael Chemtob wrote:
> > Hi,
> > I'm using session cookies on my web app and it looks like the session
> > is not being killed when the user closes the browser. We use a
> > Global.asa file on our app. Do we have to explicitly write to close
> > the session or does it get killed when the user is closes their
> > browser?
> >
> > Please advise.
> > rafael

>
> The server does not "know" when a user closes his browser, so it cannot

kill
> a session when that occurs. there are only two situations where the server
> will kill a session:
>
> 1. A page issues a Session.Abandon command
> 2. The session times out
>
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>



 
Reply With Quote
 
Mark Schupp
Guest
Posts: n/a
 
      02-12-2004
You would have to perform a request to the server from the unload event.
session.abandon is a server-side scripting function.
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Vilmar Brazão de Oliveira" <> wrote in message
news:%23%...
> hi,
> is there a possibility of doing this on unload event of window, use
> session.abandon method?
> thanks,
>
> --
> ««««««««»»»»»»»»»»»»»»
> Vlmar Brazão de Oliveira
> Desenvolvimento Web
> HI-TEC
> "Bob Barrows [MVP]" <> escreveu na mensagem
> news:#...
> > Rafael Chemtob wrote:
> > > Hi,
> > > I'm using session cookies on my web app and it looks like the session
> > > is not being killed when the user closes the browser. We use a
> > > Global.asa file on our app. Do we have to explicitly write to close
> > > the session or does it get killed when the user is closes their
> > > browser?
> > >
> > > Please advise.
> > > rafael

> >
> > The server does not "know" when a user closes his browser, so it cannot

> kill
> > a session when that occurs. there are only two situations where the

server
> > will kill a session:
> >
> > 1. A page issues a Session.Abandon command
> > 2. The session times out
> >
> > Bob Barrows
> > --
> > Microsoft MVP -- ASP/ASP.NET
> > Please reply to the newsgroup. The email account listed in my From
> > header is my spam trap, so I don't check it very often. You will get a
> > quicker response by posting to the newsgroup.
> >
> >

>
>



 
Reply With Quote
 
Vilmar Brazão de Oliveira
Guest
Posts: n/a
 
      02-12-2004
ok, but send me a sample of that running.
thanks

--

Sem mais,

««««««««»»»»»»»»»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
"Mark Schupp" <> escreveu na mensagem
news:...
> You would have to perform a request to the server from the unload event.
> session.abandon is a server-side scripting function.
> --
> Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
>
> "Vilmar Brazão de Oliveira" <> wrote in message
> news:%23%...
> > hi,
> > is there a possibility of doing this on unload event of window, use
> > session.abandon method?
> > thanks,
> >
> > --
> > ««««««««»»»»»»»»»»»»»»
> > Vlmar Brazão de Oliveira
> > Desenvolvimento Web
> > HI-TEC
> > "Bob Barrows [MVP]" <> escreveu na mensagem
> > news:#...
> > > Rafael Chemtob wrote:
> > > > Hi,
> > > > I'm using session cookies on my web app and it looks like the

session
> > > > is not being killed when the user closes the browser. We use a
> > > > Global.asa file on our app. Do we have to explicitly write to close
> > > > the session or does it get killed when the user is closes their
> > > > browser?
> > > >
> > > > Please advise.
> > > > rafael
> > >
> > > The server does not "know" when a user closes his browser, so it

cannot
> > kill
> > > a session when that occurs. there are only two situations where the

> server
> > > will kill a session:
> > >
> > > 1. A page issues a Session.Abandon command
> > > 2. The session times out
> > >
> > > Bob Barrows
> > > --
> > > Microsoft MVP -- ASP/ASP.NET
> > > Please reply to the newsgroup. The email account listed in my From
> > > header is my spam trap, so I don't check it very often. You will get a
> > > quicker response by posting to the newsgroup.
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cancelling session when user closes browser window... Charlie@NISH ASP .Net 3 08-30-2005 08:00 PM
How to end a session when the user closes the browser? news.microsoft.com ASP .Net 5 02-01-2005 11:34 AM
Session_End does not fire when user closes browser Keith-Earl ASP .Net 4 11-15-2004 04:27 PM
Trapping the <BODY> onUnload() / Detecting when a user closes the browser =B= ASP .Net 3 09-30-2004 08:20 AM
server needs to know when user closes browser window feng ASP .Net 1 12-03-2003 06:54 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57