Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

Session_OnEnd not firing sometimes?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris  Ashley - 12 Dec 2007 12:11 GMT
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?
Michael Nemtsev [MVP] - 12 Dec 2007 12:43 GMT
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>
Chris  Ashley - 12 Dec 2007 13:08 GMT
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?

> Hello Chris,
>
[quoted text clipped - 17 lines]
> CA> Application_Error being hit cause Session_OnEnd not to fire?
> CA>
Michael Nemtsev [MVP] - 12 Dec 2007 13:22 GMT
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...@msn.com> wrote:
CA>
>> Hello Chris,
>>
[quoted text clipped - 20 lines]
>> CA> Application_Error being hit cause Session_OnEnd not to fire?
>> CA>
Hal Rosser - 12 Dec 2007 20:11 GMT
> There seem to be isolated occurences of Session_OnEnd not firing in my
> app. This is problematic because some clean up of resources happens
[quoted text clipped - 3 lines]
> 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,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.