Ejemplo n.º 1
0
 protected void Session_End(object sender, EventArgs e)
 {
     try
     {
         SessionTracker sessionTracker = (SessionTracker)Session[SessionKeys.Tracker];
         FormsAuthentication.SignOut();
         if ((sessionTracker == null))
         {
             return;
         }
         else
         {
             SessionLog sLog = new SessionLog();
             sLog.SessionLogEnd(sessionTracker);
         }
     }
     catch
     {
     }
     if (HttpContext.Current != null)
     {
         if (null != HttpContext.Current.Session)
         {
             HttpContext.Current.Session.Abandon();
         }
     }
 }
Ejemplo n.º 2
0
        protected void Session_End(object sender, EventArgs e)
        {
            try
            {
                // SessionTracker sessionTracker = (SessionTracker)Session[SessionKeys.Tracker];
                FormsAuthentication.SignOut();
                //if ((sessionTracker == null))
                //{
                //    return;
                //}
                //else
                //{

                SageFrameConfig SageConfig = new SageFrameConfig();
                SageFrameSettingKeys.PageExtension = SageConfig.GetSettingsByKey(SageFrameSettingKeys.SettingPageExtension);
                bool EnableSessionTracker = bool.Parse(SageConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.EnableSessionTracker));
                if (EnableSessionTracker)
                {
                    SessionLog sLog     = new SessionLog();
                    int        PortalID = int.Parse(HttpContext.Current.Session[SessionKeys.SageFrame_PortalID].ToString());
                    sLog.SessionLogEnd(PortalID);
                }
                //}
            }
            catch
            {
            }
            if (HttpContext.Current != null)
            {
                if (null != HttpContext.Current.Session)
                {
                    HttpContext.Current.Session.Abandon();
                }
            }
        }
Ejemplo n.º 3
0
        protected void Session_End(object sender, EventArgs e)
        {
            try
            {
                SessionIDManager manager = new SessionIDManager();
                manager.RemoveSessionID(System.Web.HttpContext.Current);
                var newId        = manager.CreateSessionID(System.Web.HttpContext.Current);
                var isRedirected = true;
                var isAdded      = true;
                manager.SaveSessionID(System.Web.HttpContext.Current, newId, out isRedirected, out isAdded);

                SessionTracker sessionTracker = (SessionTracker)Session[SessionKeys.Tracker];
                FormsAuthentication.SignOut();
                if ((sessionTracker == null))
                {
                    return;
                }
                else
                {
                    SessionLog sLog = new SessionLog();
                    sLog.SessionLogEnd(sessionTracker);
                }
            }
            catch
            {
            }
            if (HttpContext.Current != null)
            {
                if (null != HttpContext.Current.Session)
                {
                    HttpContext.Current.Session.Abandon();
                }
            }
        }