Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Session_End

Reply
Thread Tools

Re: Session_End

 
 
Kevin Spencer
Guest
Posts: n/a
 
      08-15-2003
Also, the Page_Unload Event fires BEFORE the page is even returned to the
browser. It is the event that is fired when the Page Class is unloaded after
execution.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Neither a follower nor a lender be.

"William F. Robertson, Jr." <> wrote in message
news:...
> Session_End is called in one of two ways.
>
> 1. Session.Abandon() is called from the codebehind file.
> 2. The timeout has occured for the session.
>
> These are the only two reasons. (or if the application restarts)
>
> You will have to leave your debugger open for the timeout period (default

of
> 20 minutes). But don't close the browser window out. It will stop the
> debugger if you are using Studio.
>
> HTH,
>
> bill
>
>
>
> "Tracey" <> wrote in message
> news:05c901c36343$f97ccc10$...
> > Hey folks, I've got an ASP.NET application running just
> > fine and I want to handle the Session_End event, but the
> > event just isn't firing. I can put a break point there or
> > save a row to a log table and neither of these show the
> > event firing. What is wrong here? Has someone actually
> > trapped this event? Is there some trick to getting this
> > thing to work? Is there a bug? What?
> >
> > I want to know when the client closes his/her explorer and
> > the Session_End seemed like the perfect thing but the
> > wretch event just won't fire. Then I tried intecepting the
> > Page_Unload event of one of my web forms and I get an
> > error! What is it about trying to find out when the
> > session ends or someone closes their browser that is such
> > a pain to intercept?

>
>



 
Reply With Quote
 
 
 
 
William F. Robertson, Jr.
Guest
Posts: n/a
 
      08-15-2003
Session_End is called in one of two ways.

1. Session.Abandon() is called from the codebehind file.
2. The timeout has occured for the session.

These are the only two reasons. (or if the application restarts)

You will have to leave your debugger open for the timeout period (default of
20 minutes). But don't close the browser window out. It will stop the
debugger if you are using Studio.

HTH,

bill



"Tracey" <> wrote in message
news:05c901c36343$f97ccc10$...
> Hey folks, I've got an ASP.NET application running just
> fine and I want to handle the Session_End event, but the
> event just isn't firing. I can put a break point there or
> save a row to a log table and neither of these show the
> event firing. What is wrong here? Has someone actually
> trapped this event? Is there some trick to getting this
> thing to work? Is there a bug? What?
>
> I want to know when the client closes his/her explorer and
> the Session_End seemed like the perfect thing but the
> wretch event just won't fire. Then I tried intecepting the
> Page_Unload event of one of my web forms and I get an
> error! What is it about trying to find out when the
> session ends or someone closes their browser that is such
> a pain to intercept?



 
Reply With Quote
 
 
 
 
William F. Robertson, Jr.
Guest
Posts: n/a
 
      08-15-2003
Kevin,

I thought the page was sent to the browser in the Render event.

Does the HtmlTextWriter hold the reponse data until after Page_Unload is
called, and then flush it to the browser?

If this is the default behavior, is it overridden when the Response.Flush is
called?

bill

"Kevin Spencer" <> wrote in message
news:...
> Also, the Page_Unload Event fires BEFORE the page is even returned to the
> browser. It is the event that is fired when the Page Class is unloaded

after
> execution.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> http://www.takempis.com
> Neither a follower nor a lender be.
>
> "William F. Robertson, Jr." <> wrote in message
> news:...
> > Session_End is called in one of two ways.
> >
> > 1. Session.Abandon() is called from the codebehind file.
> > 2. The timeout has occured for the session.
> >
> > These are the only two reasons. (or if the application restarts)
> >
> > You will have to leave your debugger open for the timeout period

(default
> of
> > 20 minutes). But don't close the browser window out. It will stop the
> > debugger if you are using Studio.
> >
> > HTH,
> >
> > bill
> >
> >
> >
> > "Tracey" <> wrote in message
> > news:05c901c36343$f97ccc10$...
> > > Hey folks, I've got an ASP.NET application running just
> > > fine and I want to handle the Session_End event, but the
> > > event just isn't firing. I can put a break point there or
> > > save a row to a log table and neither of these show the
> > > event firing. What is wrong here? Has someone actually
> > > trapped this event? Is there some trick to getting this
> > > thing to work? Is there a bug? What?
> > >
> > > I want to know when the client closes his/her explorer and
> > > the Session_End seemed like the perfect thing but the
> > > wretch event just won't fire. Then I tried intecepting the
> > > Page_Unload event of one of my web forms and I get an
> > > error! What is it about trying to find out when the
> > > session ends or someone closes their browser that is such
> > > a pain to intercept?

> >
> >

>
>



 
Reply With Quote
 
Tracey
Guest
Posts: n/a
 
      08-15-2003
Thank-you for replying. So what about a way to know when
they have actually closed their browser? Is there a way to
let my application know that the user has basically ended
their session by closing their browser?

>-----Original Message-----
>Session_End is called in one of two ways.
>
>1. Session.Abandon() is called from the codebehind file.
>2. The timeout has occured for the session.
>
>These are the only two reasons. (or if the application

restarts)
>
>You will have to leave your debugger open for the timeout

period (default of
>20 minutes). But don't close the browser window out. It

will stop the
>debugger if you are using Studio.
>
>HTH,
>
>bill
>
>
>
>"Tracey" <> wrote in message
>news:05c901c36343$f97ccc10$...
>> Hey folks, I've got an ASP.NET application running just
>> fine and I want to handle the Session_End event, but the
>> event just isn't firing. I can put a break point there

or
>> save a row to a log table and neither of these show the
>> event firing. What is wrong here? Has someone actually
>> trapped this event? Is there some trick to getting this
>> thing to work? Is there a bug? What?
>>
>> I want to know when the client closes his/her explorer

and
>> the Session_End seemed like the perfect thing but the
>> wretch event just won't fire. Then I tried intecepting

the
>> Page_Unload event of one of my web forms and I get an
>> error! What is it about trying to find out when the
>> session ends or someone closes their browser that is

such
>> a pain to intercept?

>
>
>.
>

 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      08-15-2003
I was painting in broad strokes there, bill. What I meant was, the event
occurs on the server side, not on the client. I don't know of any
documentation that details exactly when the Response is streamed to the
browser. I know that if Response.BufferOutput is turned off, parts of the
Response are indeed streamed to the browser during Page execution. However,
if it is turned on, I don't know exactly when it occurs.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Neither a follower nor a lender be.

"William F. Robertson, Jr." <> wrote in message
news:...
> Kevin,
>
> I thought the page was sent to the browser in the Render event.
>
> Does the HtmlTextWriter hold the reponse data until after Page_Unload is
> called, and then flush it to the browser?
>
> If this is the default behavior, is it overridden when the Response.Flush

is
> called?
>
> bill
>
> "Kevin Spencer" <> wrote in message
> news:...
> > Also, the Page_Unload Event fires BEFORE the page is even returned to

the
> > browser. It is the event that is fired when the Page Class is unloaded

> after
> > execution.
> >
> > --
> > HTH,
> >
> > Kevin Spencer
> > Microsoft MVP
> > .Net Developer
> > http://www.takempis.com
> > Neither a follower nor a lender be.
> >
> > "William F. Robertson, Jr." <> wrote in message
> > news:...
> > > Session_End is called in one of two ways.
> > >
> > > 1. Session.Abandon() is called from the codebehind file.
> > > 2. The timeout has occured for the session.
> > >
> > > These are the only two reasons. (or if the application restarts)
> > >
> > > You will have to leave your debugger open for the timeout period

> (default
> > of
> > > 20 minutes). But don't close the browser window out. It will stop

the
> > > debugger if you are using Studio.
> > >
> > > HTH,
> > >
> > > bill
> > >
> > >
> > >
> > > "Tracey" <> wrote in message
> > > news:05c901c36343$f97ccc10$...
> > > > Hey folks, I've got an ASP.NET application running just
> > > > fine and I want to handle the Session_End event, but the
> > > > event just isn't firing. I can put a break point there or
> > > > save a row to a log table and neither of these show the
> > > > event firing. What is wrong here? Has someone actually
> > > > trapped this event? Is there some trick to getting this
> > > > thing to work? Is there a bug? What?
> > > >
> > > > I want to know when the client closes his/her explorer and
> > > > the Session_End seemed like the perfect thing but the
> > > > wretch event just won't fire. Then I tried intecepting the
> > > > Page_Unload event of one of my web forms and I get an
> > > > error! What is it about trying to find out when the
> > > > session ends or someone closes their browser that is such
> > > > a pain to intercept?
> > >
> > >

> >
> >

>
>



 
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
HttpModule gets InProc Session_Start, not Session_End Steve Donnelly ASP .Net 0 08-30-2003 09:03 PM
Session lasting too long -- Session_End event firing way late !! ?? Steve M ASP .Net 5 07-31-2003 09:44 AM
Session_End never fires Kenn Ghannon ASP .Net 9 07-10-2003 02:49 PM
session_end and re-login Burak Kadirbeyoglu ASP .Net 1 07-10-2003 02:00 PM
Session_End Not Firing Chris Sibel ASP .Net 2 07-02-2003 08:04 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