session_onend event not firing

R

rob

I've got code in my session_onend event that clears out
database entries based on the sessionID that just
expired. The code works in the development environment,
but doesn't work in the production envrionment. Anyone
have any ideas of what to check? No errors are being
reported, just not firing... :-(

Thanks!
 
C

Carl Prothman [MVP]

rob said:
I've got code in my session_onend event that clears out
database entries based on the sessionID that just
expired. The code works in the development environment,
but doesn't work in the production envrionment. Anyone
have any ideas of what to check? No errors are being
reported, just not firing... :-(

Rob,
What is different between the development and production envrionments?
Does the production envrionment have an IIS Application or Virtual Directory?
Does the production envrionment using inproc, out-of-process session?

Try calling Session.Abandon directly and see if the event fires. Otherwise,
the Session_End event will fire after the Session times out, or the application
is restarted.

Also, you typed "session_onend". Did you mean "Session_End"?
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session ends
End Sub

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com
 
R

rob richard

I'm using inproc session, and disabled cookies. The difference between
the two environments are vast - the dev environment is a win XP machine
with a virtual directory. The production machine is a win 2003 machine
with a website. In reference to the session_onend vs. session_end, I
tried them both. The microsoft site uses the onend, and other sites use
just end - neither worked in the production environment. I'll try the
session.abandon and see what happens...
 
A

alien2_51

If you go into your Internet Services Manager find your virtual directory
open the property pages and on the Virtual Directory tab theres a section
called Application Settings.... If you click Configuration you get another
dialog that has an App Options tab is the check box that says Enable session
state checked..? If not check it... What is the timeout setting...? Try
opening up Perfom and adding a active sessions hook for asp.net
applications... you should be able see the active sessions based on the
instance or virtual directory..... Do you have any active sessions...?
 
A

Anand

Change the mode="stateServer" and Datasource = localhost..
instead of 127.0.0.1

Setting goes like this
<SessionState
mode="StateServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=localhost;user id=sa;password="
cookieless="false"
timeout="60"

/>
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top