Session_End Event does not Fire.

G

Guest

All the documentation and discussion I have read indicate that the
Session_End is not supposed to fire unless you are in "inProc" Session state
mode, and then only on Session Timeout or at Session Abandon. I need the
event to fire at Session timeout in order to capture and store the Datetime
this occurs. However in the application I am writing, I have been unable
discern any indication that the event is firing. I have used break points,
writes to a database table, and writes to a text file to indicate when this
event fires. So far I have got nothing back. Yet I am able to verify the
the session has timed out. I have no indication of code failure, but nothing
happens when this event is supposed to fire. I really do need this so
information would be hugely appreciated.

ERJ MCSD MCDBA.
 
M

Marina

1) How are you sure that the session has indeed timed out?
2) Are you sure whatever code you have in Session_End isn't failing due to a
coding error?
3) Show us the code you have for your Session_End handler
 
H

Hans Kesting

OldProgrammer said:
All the documentation and discussion I have read indicate that the
Session_End is not supposed to fire unless you are in "inProc"
Session state mode, and then only on Session Timeout or at Session
Abandon. I need the event to fire at Session timeout in order to
capture and store the Datetime this occurs. However in the
application I am writing, I have been unable discern any indication
that the event is firing. I have used break points, writes to a
database table, and writes to a text file to indicate when this event
fires. So far I have got nothing back. Yet I am able to verify the
the session has timed out. I have no indication of code failure, but
nothing happens when this event is supposed to fire. I really do
need this so information would be hugely appreciated.

ERJ MCSD MCDBA.

You didn't specify, but when do you expect the Session_End to
occur? It's 20 minutes (by default) after the last request for this
session, not (as a lot of people assume) as soon as the browser
closes or the user "navigates away".

Hans Kesting
 
G

Guest

See above my post 9/19/05 1:25 PST

Here:

Dim swObject As StreamWriter 'Text Stream Object
Dim sPath As String

sPath = Server.MapPath("testClose.txt")

swObject = File.CreateText(sPath)
swObject.Write("closing" & CStr(Now()))
swObject = Nothing
 
G

Guest

I used one of our few MS support calls and got the answer direct from the
source.


ERJ MCSD MCDBA.
 
S

S. Justin Gengo

Hans,

At this point try putting a try catch around your OnSessionEnd Code.

Try
'---Your code here
Catch ex As Exception
Dim Test As String = "Place a breakpoint on this line and examine ""ex""
if the breakpoint is hit"
End Try

It's possible that your code is throwing an error before any breakpoint you
set is hit. This test may catch something.

Otherwise please show the code for your entire OnSessionEnd (Including all
the code even the declaration of the even handler.)


--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,097
Latest member
RayE496148

Latest Threads

Top