473,624 Members | 2,561 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session_End problem

In Global asax the Session_End Sub fires off every now and then. I only want
it to fire when I call Session.Abandon () but it fires off totally randon
when just suring around in my ASP.NET solution. Does anyone have any ideas
abotu this why it happens?

best regards/
Lars Netzel
Nov 19 '05 #1
5 1737
"Lars Netzel" <ui****@adf.s e> wrote in message
news:uL******** *****@TK2MSFTNG P14.phx.gbl...
In Global asax the Session_End Sub fires off every now and then. I only
want it to fire when I call Session.Abandon () but it fires off totally
randon when just suring around in my ASP.NET solution. Does anyone have
any ideas abotu this why it happens?


Sounds like you have your Session.Timeout property set to a really low
value...
Nov 19 '05 #2
nope, its set to 60 minutes

/Lars
"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
"Lars Netzel" <ui****@adf.s e> wrote in message
news:uL******** *****@TK2MSFTNG P14.phx.gbl...
In Global asax the Session_End Sub fires off every now and then. I only
want it to fire when I call Session.Abandon () but it fires off totally
randon when just suring around in my ASP.NET solution. Does anyone have
any ideas abotu this why it happens?


Sounds like you have your Session.Timeout property set to a really low
value...

Nov 19 '05 #3
By default the Session_End event is called 20 minutes after that session's
last page request.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Lars Netzel" <ui****@adf.s e> wrote in message
news:uL******** *****@TK2MSFTNG P14.phx.gbl...
In Global asax the Session_End Sub fires off every now and then. I only
want it to fire when I call Session.Abandon () but it fires off totally
randon when just suring around in my ASP.NET solution. Does anyone have
any ideas abotu this why it happens?

best regards/
Lars Netzel

Nov 19 '05 #4
ok, that's cool but I get a Session_end sometimes directly when a page
loads... but only sometimes

/Lars

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:ez******** ******@tk2msftn gp13.phx.gbl...
By default the Session_End event is called 20 minutes after that session's
last page request.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Lars Netzel" <ui****@adf.s e> wrote in message
news:uL******** *****@TK2MSFTNG P14.phx.gbl...
In Global asax the Session_End Sub fires off every now and then. I only
want it to fire when I call Session.Abandon () but it fires off totally
randon when just suring around in my ASP.NET solution. Does anyone have
any ideas abotu this why it happens?

best regards/
Lars Netzel


Nov 19 '05 #5
Session_End will no execute in the context of a request -- it runs after
the timeout "on its own", so to speak. So you shouldn't be accessing things
like Request and Response in there (not that you are). I just wanted to mention
that it's not tied to a request, so your obversation is a coincidence.

-Brock
DevelopMentor
http://staff.develop.com/ballen
ok, that's cool but I get a Session_end sometimes directly when a page
loads... but only sometimes

/Lars

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:ez******** ******@tk2msftn gp13.phx.gbl...
By default the Session_End event is called 20 minutes after that
session's last page request.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Lars Netzel" <ui****@adf.s e> wrote in message
news:uL******** *****@TK2MSFTNG P14.phx.gbl...
In Global asax the Session_End Sub fires off every now and then. I
only want it to fire when I call Session.Abandon () but it fires off
totally randon when just suring around in my ASP.NET solution. Does
anyone have any ideas abotu this why it happens?

best regards/
Lars Netzel


Nov 19 '05 #6

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

Similar topics

1
1869
by: raj | last post by:
Hi, I am facing a problem of automatic session timeout problem and automatic session_end event fired. Case1: As I have analyzed I get to know that the default session timeout is 20 in web.config, If I reassign the session timeout at login page other than the time which is defined at web.config(20 Min.) then automatic session_end (in global.aspx.cs) event fired. Why automatic this event is fired??
9
10797
by: Kenn Ghannon | last post by:
I've got an ASP.NET page with a counter subtraction routine in the Session_End method in the Global.asax.cs: protected void Session_End(Object sender, EventArgs e) { ulong curUsers; Application.Lock();
5
2797
by: Steve M | last post by:
Why are my sessions lasting so long? I have them set to 20 minute timeout in config file? The Session_End event is getting called an hour or more sometimes--well after the user has stopped interacting with my site. Anyone have any insight? Thanks in advance
2
4722
by: Bela | last post by:
Hello I was wondering if someone could help me out with a Session_End problem in my Global.asax. I've tried everything, and still no success Here is the scenario: sessionstate is set to InProc. I have timeout set to 1 min I have a variable in session_start that is incremented each new session, and it is then decremented in Session_End. I use this variable on a web form to show current users online. All of this works just fine, so I...
3
566
by: Guadala Harry | last post by:
Just wondering if Session_End *always fires* for every Session. I know that IIS times out sessions after a default 20 min (unless changed) and there's no way to know when a user actually closed a browser (unless I provide a "log out" button that kills the session explicitly, and we can't guarantee the user will click on that). What I am wondering if there are there well-known/documented circumstances under which Session_End will NOT fire...
4
9169
by: Kim Bach Petersen | last post by:
I would like to record user behavior data stored in session variables. Since the data is modified throughout each session it seemed obvious to store the data when the session terminates - using Session_End in global.asax. Problem is, apparently the session-object terminating cannot be accessed from Session_End in global.asax!? What's the meaning of Session_End if you don't know which session is
6
1441
by: Beren | last post by:
Hey, I've got some code in my Session_End which cleans up all Session related items from the Cache object. I needed to store some related sessiondata in there to be able to address it in the AuthenticateRequest event. Now when I breakpoint the first line to test the Session_End code, it only breaks on the first line. A press on F11 through will just jump me out and resumes the program,
5
1142
by: Ron Vecchi | last post by:
1.) If I want to use an object that was stored in the Application state will it be avilable in the Session_End event. (even on the last session to end)?? 2.) Can I use the current sessions state in its own session_end event?? I asked because I am trying to log some data in this event and use both scenarios above but nothing is happening. Thanks! Ron
12
10660
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
Hi. I am trying to maintain a list of people who are currently "online" in SQL. I do this by adding a simple entry to a simple PeopleOnline table whenever someone logs in to my site. If they manually log OUT of the site, I have no problem deleting them from the PeopleOnline table. But if they just close the browser, I was assuming I'd have to use the Session_End() event in Global.asax even though I know that this will only occur once the...
8
1786
by: vickyl | last post by:
Hi, I've been having this problem for the pas few days so i thought i'd post and see if anyone could help. I have an application that has code to delete file in Session_end. When i start a session and then do nothing in the browser for the timeout amount of time, session_end fires and the code works....the files get deleted. However, if i close the browser and wait the same amount of time (or longer) Session_End never fires. I know that...
0
8231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8672
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8614
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8330
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6107
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2603
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1474
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.