session_onend event not firing

  • Thread starter Thread starter rob
  • Start date Start date
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!
 
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
 
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...
 
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...?
 
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"

/>
 
Back
Top