473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Session_OnEnd not firing sometimes?

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?
Dec 12 '07 #1
4 1624
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
CAThere seem to be isolated occurences of Session_OnEnd not firing in
CAmy app. This is problematic because some clean up of resources
CAhappens here. I know the Session events were unreliable in classic
CAASP, but is this still the case in ASP.Net?
CA>
CAWhat kind of scenarios would case Session_OnEnd not to fire? Would
CAApplication_Error being hit cause Session_OnEnd not to fire?
CA>
Dec 12 '07 #2
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...@msn.comwrote:
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

CAThere seem to be isolated occurences of Session_OnEnd not firing in
CAmy app. This is problematic because some clean up of resources
CAhappens here. I know the Session events were unreliable in classic
CAASP, but is this still the case in ASP.Net?
CA>
CAWhat kind of scenarios would case Session_OnEnd not to fire? Would
CAApplication_Error being hit cause Session_OnEnd not to fire?
CA>
Dec 12 '07 #3
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
CAHi michael,
CA>
CAThanks for your response.
CA>
CAIs there any alternative? Maybe I could store some object in the
CAsession and have its finalizer do the clear up? Would this work, so
CAwhen it is garbage collected (presumably at some point after there
CAis no reference to it in Session scope), my clean up will happen
CAbecause GC will call it's finalizer?
CA>
CAOn 12 Dec, 12:43, Michael Nemtsev [MVP] <nemt...@msn.comwrote:
CA>
>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

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

Dec 12 '07 #4

"Chris Ashley" <ch***********@gmail.comwrote in message
news:4e**********************************@e67g2000 hsc.googlegroups.com...
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,
Dec 12 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tom Bates | last post by:
I can successfully delete files using fso.DeleteFile when in an ASP script. But in Session_OnEnd, where I'd *really* like to clean up files, it appears that DeleteFile doesn't work. I've tried...
3
by: cab | last post by:
i have the following code in the "Sub Session_OnEnd" routine that does not seem to run..... Sub Session_OnEnd strConnect = "Driver={SQL Server};Server=SERVER;Database=database; User...
3
by: Phil Lamey | last post by:
Hi All, I have the following code but for some reason I cannot get the Session_OnEnd event to fire. I am trying to limit the amount of connections a browser session can have. Where the...
4
by: Propin | last post by:
Have a problem with below code in global.asa. Same problem as described in this news group before, IWAM_machinename did not solve my problem. Have created the following test code (file is never...
4
by: anand | last post by:
In my website i want to trace the event when user log off from the site by closing the explorer so i am unable to run any server side program at that time and my session_onend event also not...
6
by: rob | last post by:
I've got code in my session_onend event that clears out database entries based on the sessionID that just expired. The code works in the development environment, but doesn't work in the...
2
by: Raghu Raman | last post by:
Hi , am storing the session id in my database when the user signs in.The session_on start is firing nice & am doing my DB operations there & quite working good. But when the user closes the...
1
by: Andy Kasotia | last post by:
My Session_OnStart works but Session_OnEnd does not work. Here's the code...can anyone tell me what's wrong with my code or if anything else on the server that needs to be changed. The...
11
by: David Thielen | last post by:
Hi; Is there some kind of session ID variable that I can get in the code behind and that is available in Session_OnEnd() to know what session ended? -- thanks - dave...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.