Example #1
0
        public static bool VerificarDeslogar(string login, string sessionId)
        {
            if (_busFunc.VerificarSeDeveDeslogar(login, sessionId, FormsAuthentication.Timeout.Minutes))
            {
                Validacao.Add(Mensagem.Login.AcessoSimultaneo);
                Deslogar(login);
                FormsAuthentication.SignOut();

                if (HttpContext.Current.Request.Headers["X-Requested-With"] != "XMLHttpRequest")
                {
                    FormsAuthentication.RedirectToLoginPage("msg=" + Validacao.QueryParam());
                }
                return(true);
            }

            return(false);
        }