473,626 Members | 3,237 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

my session_onend is not working

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 working can any one tell me
why the session_onend is not working.
Thanx in advance

Nov 17 '05 #1
4 2570
Well...can you post the code you're using? That might help....

The Session_End will only NOT fire (as I found out the hard way) if:
1) There is an error in that section of code (it quietly exits instead of
raising error messages)
2) Nothing is stored in the Session
3) You are not using 'InProc' in your sessionstate (in the web.config file).

If you're using Visual Studio, you can set a breakpoint on that section of
code and debug your app -- make sure that your session timeout value (also
in your web.config file) is set to some ridiculously low number (like 1 for
1 minute versus the 20 for 20 minutes that it defaults to)...
"anand" <an*******@yaho o.com> wrote in message
news:13******** *************** *****@phx.gbl.. .
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 working can any one tell me
why the session_onend is not working.
Thanx in advance

Nov 17 '05 #2
Thanx for your reply
1]I have only one expression in my session_onend event
server.execute( "page.aspx" )
2] i have sesion variable
3] i am using Inproc

now the problem is if user log off from site by lcosing
the browser window the session_onend event doesn't work.
its working if i execute session.abondan or somthing like
that but it doesn't execute say after automatically after
20 min when user close down the browser
I hope you you understand what i am trying to do.
i just want to track down the user
if it is conncted to site i want to show him online other
wise offline
but if user close down the browser .......
can u help in that
-----Original Message-----
Well...can you post the code you're using? That might help....
The Session_End will only NOT fire (as I found out the hard way) if:1) There is an error in that section of code (it quietly exits instead ofraising error messages)
2) Nothing is stored in the Session
3) You are not using 'InProc' in your sessionstate (in the web.config file).
If you're using Visual Studio, you can set a breakpoint on that section ofcode and debug your app -- make sure that your session timeout value (alsoin your web.config file) is set to some ridiculously low number (like 1 for1 minute versus the 20 for 20 minutes that it defaults to)...

"anand" <an*******@yaho o.com> wrote in message
news:13******* *************** ******@phx.gbl. ..
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 working can any one tell me
why the session_onend is not working.
Thanx in advance

.

Nov 17 '05 #3
I think your problem is with #1 below. Server.Execute executes another
page, but the execute of that page expects there to be valid request and
response objects, which when you hit Session_OnEnd, are not created. You
need to create a class that does the code in "Page.aspx" but doesn't try to
return anything to the httpcontext.cur rent.response or get anything from
httpcontext.cur rent.request.

"anand" <an*******@yaho o.com> wrote in message
news:07******** *************** *****@phx.gbl.. .
Thanx for your reply
1]I have only one expression in my session_onend event
server.execute( "page.aspx" )
2] i have sesion variable
3] i am using Inproc

now the problem is if user log off from site by lcosing
the browser window the session_onend event doesn't work.
its working if i execute session.abondan or somthing like
that but it doesn't execute say after automatically after
20 min when user close down the browser
I hope you you understand what i am trying to do.
i just want to track down the user
if it is conncted to site i want to show him online other
wise offline
but if user close down the browser .......
can u help in that
-----Original Message-----
Well...can you post the code you're using? That might

help....

The Session_End will only NOT fire (as I found out the

hard way) if:
1) There is an error in that section of code (it quietly

exits instead of
raising error messages)
2) Nothing is stored in the Session
3) You are not using 'InProc' in your sessionstate (in

the web.config file).

If you're using Visual Studio, you can set a breakpoint

on that section of
code and debug your app -- make sure that your session

timeout value (also
in your web.config file) is set to some ridiculously low

number (like 1 for
1 minute versus the 20 for 20 minutes that it defaults

to)...


"anand" <an*******@yaho o.com> wrote in message
news:13******* *************** ******@phx.gbl. ..
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 working can any one tell me
why the session_onend is not working.
Thanx in advance

.

Nov 17 '05 #4
Ram
Anand,
I am just trying to understand your problem. Are you expecting the
Sesion_onEnd to fire immediately after the user closed his browser
window?

Web server will not know even if the user closed his browser window
and only the default time out will occur(20 minutes or your timeout
value). If you want to notify the web server immediately when the user
closes his window, you can launch a popup window in the unload event
of the main window and call the session.abandon in the popup window.

Please let me know if my understanding of your question is wrong.

"anand" <an*******@yaho o.com> wrote in message news:<05******* *************** ******@phx.gbl> ...
once again i am here

i got a link please look at it
http://www.codeproject.com/asp/user_logtime.asp?
df=100&forumid= 2496&select=471 196#xx76299xx

this give a demonstration how to track the user ./ but i
coudn't understand if session will tim out how the program
is going to know the session("member ") value .

can any one help in this
-----Original Message-----
Well...can you post the code you're using? That might

help....

The Session_End will only NOT fire (as I found out the

hard way) if:
1) There is an error in that section of code (it quietly

exits instead of
raising error messages)
2) Nothing is stored in the Session
3) You are not using 'InProc' in your sessionstate (in

the web.config file).

If you're using Visual Studio, you can set a breakpoint

on that section of
code and debug your app -- make sure that your session

timeout value (also
in your web.config file) is set to some ridiculously low

number (like 1 for
1 minute versus the 20 for 20 minutes that it defaults

to)...


"anand" <an*******@yaho o.com> wrote in message
news:13******* *************** ******@phx.gbl. ..
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 working can any one tell me
why the session_onend is not working.
Thanx in advance

.

Nov 17 '05 #5

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

Similar topics

3
3060
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 every combination I could think of. I've verified the filespecs I'm using by logging to a session log file. BTW, I found out the hard way that I can't reference Request.ServerVariables("APPL_PHYSICAL_PATH") from within Session_OnEnd. I had to copy...
1
1626
by: Joel Brabant | last post by:
Hi there, My session_OnEnd code is like this: --------- Dim oApp Set oApp=Server.CreateObject("AppTDE.TDEManager") Set oApp.AppInfo=Session("App") oApp.Logout 'calls a dll that calls another dll...to update a row Set Session("App")=Nothing
3
3704
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 ID=xxxxxx;Pwd=xxxxxxx" Set objConnEnd = Server.CreateObject("ADODB.Connection") objConnEnd.Open strConnect
24
2451
by: Nancy Drew | last post by:
hi all i'm trying to keep users from being able to login to a site twice at the same time. everytime a user does a login, i stick their userID into an application scoped array. if they try to login again, i bounce them to an error page. i use the session_onEnd sub within global.asa to remove their userID from the array at the end of their session, and this seems to work fine. however, if i just shut down the browser, the sub_onEnd...
14
3953
by: Agoston Bejo | last post by:
Hi! Why doesn't the following code work? Sub Session_OnEnd Dim Conn Set Conn = Server.CreateObject("ADODB.Connection") Conn.ConnectionString = Application("Connection_String") Conn.Open 'here is the error .... End Sub
4
6791
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 deleted on my IIS6 Win2003 environment, any idea?): <SCRIPT LANGUAGE="VBScript" RUNAT="Server"> Sub Application_OnStart End Sub
4
1626
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.
1
2132
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 Session_OnStart does create the folder for me with the SessionID as the folder name but Session_OnEnd does not delete that folder. Sub Session_OnStart Dim fso, f, DirToCreate 'Create a folder to store PDF Files Set fso =...
11
2094
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 david_at_windward_dot_net http://www.windwardreports.com
0
8262
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
8196
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
8701
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
8637
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...
0
7192
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6122
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
4090
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...
1
2623
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
1807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.