Exemplo n.º 1
0
        public static void LogOut(LoginInfo login)
        {
            if (login == null)
            {
                return;
            }

            AccountOP op = new AccountOP(null);

            op.Logout(login);

            FormsAuthentication.SignOut();

            HttpCookie cookie = HttpContext.Current.Response.Cookies[FormsAuthentication.FormsCookieName];

            if (cookie != null)
            {
                cookie.Path  = HttpContext.Current.Request.ApplicationPath;
                cookie.Value = "";
            }
            HttpContext.Current.Session.Clear();
            HttpContext.Current.Session.Abandon();
            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.End();
        }
Exemplo n.º 2
0
        public static LoginInfo LoginBykey(string sUserName, string sPassword, string clientIP, string clientName, int port, string KeyID)
        {
            AccountOP op = new AccountOP(null);

            Login = op.LoginBykey(KeyID);

            return(Login);
        }
Exemplo n.º 3
0
        public static LoginInfo LogIn(string sUserName, string sPassword, string clientIP, string clientName, int port)
        {
            AccountOP op = new AccountOP(null);

            Login = op.Login(sUserName, sPassword, clientIP, clientName, port);

            return(Login);
        }