Example #1
0
        public ActionResult Logout()
        {
            string HTTPS_DOMAIN = Config.GetConfigValue("HTTPS_PROTOCOL") + Request.Url.Authority; //ex)https://www.lenscloth.kr
            string HTTP_DOMAIN = Config.GetConfigValue("HTTP_PROTOCOL") + Request.Url.Authority; //ex)http://www.lenscloth.kr

            UrlHelper urlHelper = new UrlHelper(this.ControllerContext.RequestContext); // https -> http 로 변경 적용시에

            //로그아웃 세션 세팅
            CookieSessionStore cookiesession = new CookieSessionStore();
            cookiesession.SetSecretSession("memId", "");
            cookiesession.SetSecretSession("memName", "");
            cookiesession.SetSecretSession("memGradeCode", "");
            cookiesession.SetSecretSession("memGradeCodeNM", "");
            cookiesession.ClearSession();

            return Redirect(urlHelper.Action("Index", "Home", null, "http"));
        }