HighTechTalks DotNet Forums  

Session_OnEnd not firing sometimes?

ASP.net ASP.net discussions (microsoft.public.dotnet.framework.aspnet)


Discuss Session_OnEnd not firing sometimes? in the ASP.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Chris Ashley
 
Posts: n/a

Default Session_OnEnd not firing sometimes? - 12-12-2007 , 07:11 AM






There seem to be isolated occurences of Session_OnEnd not firing in my
app. This is problematic because some clean up of resources happens
here. I know the Session events were unreliable in classic ASP, but is
this still the case in ASP.Net?

What kind of scenarios would case Session_OnEnd not to fire? Would
Application_Error being hit cause Session_OnEnd not to fire?

Reply With Quote
  #2  
Old   
Michael Nemtsev [MVP]
 
Posts: n/a

Default Re: Session_OnEnd not firing sometimes? - 12-12-2007 , 07:43 AM






Hello Chris,

yep, it's still not relyable.
1) it works only for the InProc session management
2) With some SP (for VS or for Windows) it doesn't work at all - need hotfix




---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


CA> There seem to be isolated occurences of Session_OnEnd not firing in
CA> my app. This is problematic because some clean up of resources
CA> happens here. I know the Session events were unreliable in classic
CA> ASP, but is this still the case in ASP.Net?
CA>
CA> What kind of scenarios would case Session_OnEnd not to fire? Would
CA> Application_Error being hit cause Session_OnEnd not to fire?
CA>



Reply With Quote
  #3  
Old   
Chris Ashley
 
Posts: n/a

Default Re: Session_OnEnd not firing sometimes? - 12-12-2007 , 08:08 AM



Hi michael,

Thanks for your response.

Is there any alternative? Maybe I could store some object in the
session and have its finalizer do the clear up? Would this work, so
when it is garbage collected (presumably at some point after there is
no reference to it in Session scope), my clean up will happen because
GC will call it's finalizer?

On 12 Dec, 12:43, Michael Nemtsev [MVP] <nemt... (AT) msn (DOT) com> wrote:
Quote:
Hello Chris,

yep, it's still not relyable.
1) it works only for the InProc session management
2) With some SP (for VS or for Windows) it doesn't work at all - need hotfix

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

CA> There seem to be isolated occurences of Session_OnEnd not firing in
CA> my app. This is problematic because some clean up of resources
CA> happens here. I know the Session events were unreliable in classic
CA> ASP, but is this still the case in ASP.Net?
CA
CA> What kind of scenarios would case Session_OnEnd not to fire? Would
CA> Application_Error being hit cause Session_OnEnd not to fire?
CA


Reply With Quote
  #4  
Old   
Michael Nemtsev [MVP]
 
Posts: n/a

Default Re: Session_OnEnd not firing sometimes? - 12-12-2007 , 08:22 AM



Hello Chris,

You can use Application and Cache instead

read the MSDN to get more info about this


---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


CA> Hi michael,
CA>
CA> Thanks for your response.
CA>
CA> Is there any alternative? Maybe I could store some object in the
CA> session and have its finalizer do the clear up? Would this work, so
CA> when it is garbage collected (presumably at some point after there
CA> is no reference to it in Session scope), my clean up will happen
CA> because GC will call it's finalizer?
CA>
CA> On 12 Dec, 12:43, Michael Nemtsev [MVP] <nemt... (AT) msn (DOT) com> wrote:
CA>
Quote:
Hello Chris,

yep, it's still not relyable.
1) it works only for the InProc session management
2) With some SP (for VS or for Windows) it doesn't work at all - need
hotfix
---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

CA> There seem to be isolated occurences of Session_OnEnd not firing
in
CA> my app. This is problematic because some clean up of resources
CA> happens here. I know the Session events were unreliable in
classic
CA> ASP, but is this still the case in ASP.Net?
CA
CA> What kind of scenarios would case Session_OnEnd not to fire?
Would
CA> Application_Error being hit cause Session_OnEnd not to fire?
CA



Reply With Quote
  #5  
Old   
Hal Rosser
 
Posts: n/a

Default Re: Session_OnEnd not firing sometimes? - 12-12-2007 , 03:11 PM




"Chris Ashley" <chris.ashley2 (AT) gmail (DOT) com> wrote

Quote:
There seem to be isolated occurences of Session_OnEnd not firing in my
app. This is problematic because some clean up of resources happens
here. I know the Session events were unreliable in classic ASP, but is
this still the case in ASP.Net?

What kind of scenarios would case Session_OnEnd not to fire? Would
Application_Error being hit cause Session_OnEnd not to fire?
I think the Session timeout can be set on the server,




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.