I have an asp.net application that is developed under the IDE of VB2003.net enterprise edition. I can track current and historical Login date/time by calling stored procedure under MSSQL2000 database from the login.aspx page.
I'm having inconsistent update of logout time for the same user when the user logs out by using the "X" on the IE browser. I tried using the Global.asax and I get a timing or inconsistent updates on the logout time. Here is the code fragment in the Global.asax.
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session ends
Dim Connection As New Translator
Dim stconnection As String
Dim sqlLogin As New SqlConnection
Dim sqlcmd As New SqlCommand
Dim sqlParam As New SqlParameter
Dim LogID As Integer
Application("UserCt") = Application("UserCt") - 1
LogID = Application("LogID")
stconnection = Connection.connect
sqlLogin = New SqlConnection(stconnection)
sqlcmd = New SqlCommand("UpdLogOut", sqlLogin)
sqlcmd.CommandType = CommandType.StoredProcedure
sqlcmd.Parameters.Add(New SqlParameter("@LogID", SqlDbType.Int))
sqlcmd.Parameters("@LogID").Value = LogID
Any suggestions or work-around?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!