473,729 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application on end & session not firing


HI,

am using a simple project in asp.net using c#.

if i put the break point in the application start & session start event
, they are firing good .BUT WHEN i close my project while running on IE,
the session end & application end event are not firing even though i put
the break point there.

Could u give me the solution for this how i could trace those.

With Regards
Raghu
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
5 2494
Hello Raghu,

Those events are not fired when you close the project, the Session OnEnd is fired when the session times out or is closed explicitly using Session.Abandon (). To trigger the Application End event, you should restart the web site or the IIS service.
Try calling Session.Abandon () from a webform.

Greeting!
-----
Ariel Popovsky

HI,

am using a simple project in asp.net using c#.

if i put the break point in the application start & session start
event , they are firing good .BUT WHEN i close my project while
running on IE, the session end & application end event are not firing
even though i put the break point there.

Could u give me the solution for this how i could trace those.

With Regards
Raghu
*** Sent via Developersdex http://www.developersdex.com *** Don't just
participate in USENET...get rewarded for it!


Nov 18 '05 #2
"Raghu Raman" <ra************ @rediffmail.com > wrote in message
news:%2******** **********@TK2M SFTNGP10.phx.gb l...
Could u give me the solution for this how i could trace those.


Your Session doesn't end just by closing your browser or your Web project -
the Session will end when you EXPLICITLY end it, or when it times out
naturally, and that's when the Session_OnEnd will fire

Same with Application_OnE nd, which will fire when the very last connected
Session is explicitly ended or times out naturally...
Nov 18 '05 #3
The Session_End event should fire, but not when the user drops the browser.
It happens when the session times out, which is generally 10 to 20 minutes
later. Also Session_End is supported only in InProc mode.

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Raghu Raman" <ra************ @rediffmail.com > wrote in message
news:#8******** ******@TK2MSFTN GP10.phx.gbl...

HI,

am using a simple project in asp.net using c#.

if i put the break point in the application start & session start event
, they are firing good .BUT WHEN i close my project while running on IE,
the session end & application end event are not firing even though i put
the break point there.

Could u give me the solution for this how i could trace those.

With Regards
Raghu
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4

Hi,

My hearty thanks to all of u people.

.Ya i got it clear with the session _end event and it works nice.

But , If i close the browser also, i need to log_off the user or it may
be enough to call the session_end event.

**

Now, could you please tell me how can i identify when the user closes
the application.Bec ause i am doing the database updations about the
status(y/n ;y->Logged in;N->logged out )of the user in the session_end
event.

I need to call this event , even the user closes his browser.

For example if we close the yahoo,rediff,et c browser after having seen
our mails, it is assumed that the user has quit from yahoo,rediff etc.
So the user no longer is allowed to enter into the web .He has to give
his user id & password agin .
Hearty Thanks

Raghu


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

"Raghu Raman" <ra************ @rediffmail.com > wrote in message
news:ul******** *****@TK2MSFTNG P10.phx.gbl...

Hi,

My hearty thanks to all of u people.

Ya i got it clear with the session _end event and it works nice.

But , If i close the browser also, i need to log_off the user or it may
be enough to call the session_end event.

**

Now, could you please tell me how can i identify when the user closes
the application.Bec ause i am doing the database updations about the
status(y/n ;y->Logged in;N->logged out )of the user in the session_end
event.

I need to call this event , even the user closes his browser.

For example if we close the yahoo,rediff,et c browser after having seen
our mails, it is assumed that the user has quit from yahoo,rediff etc.
So the user no longer is allowed to enter into the web .He has to give
his user id & password agin .


Looks like they use memory-only cookies. And they expire automatically "when
you close the browser". In fact, system doesn't know anything about your
state until you try to access any page again and your browser send no
cookies. This way system decides that your session has been expired.

Dmitry
Nov 18 '05 #6

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

Similar topics

2
3386
by: Jim Owen | last post by:
I know I';ve posted on this topic before, but it still doesn't work. I have a Session_End event in my Global.asax file, but it never fires. I have gone into my web.config file and in session state I changed the timeout to "2" and made sure the mode was "InProc". Then I opened my app, did some stuff, and closed it, expecting in two minutes' time the Session_End event would fire (It updates the database from the Cache). But it doesn't....
1
1304
by: Barel Yoav | last post by:
Can I access the session & application variables of asp 3.0 from aspx or *.vb page
3
1050
by: Alex Maghen | last post by:
Let's say I store a real simple value in the Session as follows Session = "Alex" Later, in a different page, I try to do something like SomeLabel.Text = Session When I do this, I get a compilation error "CS0029: Cannot implicitly convert type 'object' to 'string' Is this because an object of any type *could* be stored in there and the compiler insists that I tell it in advance? If so, is this true for any Collection
3
342
by: Jeremy | last post by:
I am relativly new to ASP.NET, and my question is this: Is it better to create a wrapper class that contains all the running settings for the application and then load that into the app state, or is it better to load the scalar variables and store them individually? In case I'm not making my self clear, is it better to do this: '// Load each variable individually Context.Cache.Add( "UserFirstName", txtFirstName.Text ... )
6
1498
by: Chase | last post by:
I'm pretty new to asp.net and am having problems with my application timing out. I've written an application that loops through all of the information on an excel spreadsheet and does certain things with it, like creating and configuring WSS sites. My application runs fine for approximately 25 minutes, then I get the 'Page cannot be displayed' error. It seems like my browser times out before the application can finish what its doing.
3
1059
by: simon | last post by:
In global.asax.vb I have: Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ' Fires when the application is started Application("OZN") = "HUF" End Sub But then on some the page nothing shows: <%=Application("OZN")%>
5
1332
by: msuk | last post by:
All, I have a VB.NET/ASP.NET application that uses some common data throughout. Now what I would like to do is instead of hitting the database every time to fetch back two dataset of 5 rows 2 cols I would like to use the application object to store these 2 dataset. I would like to know if this is advisable and will there be any performance issues? Thanks Msuk
3
6505
by: =?Utf-8?B?bWdvcHBlcnQ=?= | last post by:
I'm having an issue with using web services in a web application marked with session cookieless attribuet set to "AutoDetect". My real life scenario is too complex to lay out but here's my situation boiled down to the nuts and bolts... 1. Create a simple web application (not a web site) in VS 2005 2. Add a web.config and then set the Session to InProc and cookieless="Autodetect" <sessionState mode="InProc" cookieless="AutoDetect"...
0
5018
by: bharathreddy | last post by:
Here I will given an example on how to access the session, application and querystring variables in an .cs class file. Using System.Web.HttpContext class. 1) For accesing session variables : System.Web.HttpContext.Current.Session 2) For accesing Application variables : System.Web.HttpContext.Current.Application 3) For accesing QueryString variables : System.Web.HttpContext.Current.Request.QueryString Here is a simple example where...
0
8936
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
8768
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9436
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
9166
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6722
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
6028
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();...
0
4538
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4799
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3248
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

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.