session_end

N

news.microsoft.com

For some odd reason, session start fires but session_end does not.

I am running the web server inproc, the web.config is configured as:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="true"
timeout="1"
/>

any ideas why session_end won't fire?
 
G

Guest

Session_end will fire when you do a Session.Abandon(). Is that the case?

Another question. When are you expecting Session_End to fire in your
application?

Regards,

Deepak
[I Code, therefore I am]
 
S

Steve C. Orr [MVP, MCSD]

The session_end event is normally called after the server has not gotten any
page requests from the user for 20 minutes (default, configurable in your
web.config).
The Session_End won't fire in a few circumstances, such as when you
end the session prematurely (i.e. pressing the stop button in VS.NET) or if
you aren't using the standard InProc sessions.

Here's more details for you:
http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=7504
 
G

gg

I have been both trying to get it to fire either session.abandon or also
waiting for the timeout. The web.config (which i posted in the first post)
shows that it's "InProc".

What i am trying to do is set up a header refesh to occur prior to the
session expire. I store the start time of the session at the same time i
set the refresh. I set the sesson length to 8 hours and subtracked 1800
minutes from the refresh. If, when the refresh occurs, the difference
between now() and the start time is over 7 hours I abandon the sesson. But
it seems the sesson ends even before the 8 hours (I have the timeout set at
480). Since the sesson ends, i don't have the start time anymore and the
system doesn't know it's expiring a session.

Does anyone have a better way of catching an expiring sesson a redirecting
it to another page without user intervention?



Deepak said:
Session_end will fire when you do a Session.Abandon(). Is that the case?

Another question. When are you expecting Session_End to fire in your
application?

Regards,

Deepak
[I Code, therefore I am]


news.microsoft.com said:
For some odd reason, session start fires but session_end does not.

I am running the web server inproc, the web.config is configured as:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="true"
timeout="1"
/>

any ideas why session_end won't fire?
 
G

gg

I have been both trying to get it to fire either session.abandon or also
waiting for the timeout. The web.config (which i posted in the first post)
shows that it's "InProc".

What i am trying to do is set up a header refesh to occur prior to the
session expire. I store the start time of the session at the same time i
set the refresh. I set the sesson length to 8 hours and subtracked 1800
minutes from the refresh. If, when the refresh occurs, the difference
between now() and the start time is over 7 hours I abandon the sesson. But
it seems the sesson ends even before the 8 hours (I have the timeout set at
480). Since the sesson ends, i don't have the start time anymore and the
system doesn't know it's expiring a session.

Does anyone have a better way of catching an expiring sesson a redirecting
it to another page without user intervention?
 

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

Members online

Forum statistics

Threads
473,772
Messages
2,569,591
Members
45,103
Latest member
VinaykumarnNevatia
Top