473,508 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

session_onend event not firing

rob
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 production envrionment. Anyone
have any ideas of what to check? No errors are being
reported, just not firing... :-(

Thanks!
Nov 17 '05 #1
6 2871
Is the live environment using out-of-process Sessions by any chance?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.

"rob" <ro*@robrichard.com> wrote in message
news:03****************************@phx.gbl...
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 production envrionment. Anyone
have any ideas of what to check? No errors are being
reported, just not firing... :-(

Thanks!

Nov 17 '05 #2
"rob" <ro*@robrichard.com> wrote
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 production envrionment. Anyone
have any ideas of what to check? No errors are being
reported, just not firing... :-(


Rob,
What is different between the development and production envrionments?
Does the production envrionment have an IIS Application or Virtual Directory?
Does the production envrionment using inproc, out-of-process session?

Try calling Session.Abandon directly and see if the event fires. Otherwise,
the Session_End event will fire after the Session times out, or the application
is restarted.

Also, you typed "session_onend". Did you mean "Session_End"?
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session ends
End Sub

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com

Nov 17 '05 #3
I'm using inproc session, and disabled cookies. The difference between
the two environments are vast - the dev environment is a win XP machine
with a virtual directory. The production machine is a win 2003 machine
with a website. In reference to the session_onend vs. session_end, I
tried them both. The microsoft site uses the onend, and other sites use
just end - neither worked in the production environment. I'll try the
session.abandon and see what happens...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #4


Session.Abandon() does not fire the event in production - UGGG!!!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #5
If you go into your Internet Services Manager find your virtual directory
open the property pages and on the Virtual Directory tab theres a section
called Application Settings.... If you click Configuration you get another
dialog that has an App Options tab is the check box that says Enable session
state checked..? If not check it... What is the timeout setting...? Try
opening up Perfom and adding a active sessions hook for asp.net
applications... you should be able see the active sessions based on the
instance or virtual directory..... Do you have any active sessions...?
"rob" <ro*@robrichard.com> wrote in message
news:03****************************@phx.gbl...
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 production envrionment. Anyone
have any ideas of what to check? No errors are being
reported, just not firing... :-(

Thanks!

Nov 17 '05 #6
Change the mode="stateServer" and Datasource = localhost..
instead of 127.0.0.1

Setting goes like this
<SessionState
mode="StateServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=localhost;user id=sa;password="
cookieless="false"
timeout="60"

/>
-----Original Message-----
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 production envrionment. Anyone
have any ideas of what to check? No errors are being
reported, just not firing... :-(

Thanks!
.

Nov 17 '05 #7

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

Similar topics

6
9497
by: MostlyH2O | last post by:
Hi Folks, I'm having a hard time getting my Session_OnEnd event to fire in my global.asa. Here's what I have: <SCRIPT LANGUAGE=VBSCRIPT RUNAT=Server> SUB Session_OnStart Session.TimeOut =...
3
3050
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
515
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
6763
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
1621
by: Renjith | last post by:
Hi When is Session_OnEnd event working , ive tried Abandon , Timeout still its not working. will a session end , while closing the browser window ?? Renjith.
4
2558
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...
1
2125
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
2073
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...
4
1631
by: Chris Ashley | last post by:
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...
0
7123
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
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7383
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...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.