public void OnAuthorization(AuthorizationContext filterContext) { Passport model = PresentationHelper.GetPassport(); if (!model.IsAuthenticate()) { //filterContext.HttpContext.Response.Redirect("/SignIn.html",true); filterContext.Result = new RedirectResult("/SignIn.html"); } }
public ActionResult SignIn(string flag = "", string msg = "") { Passport model = PresentationHelper.GetPassport(); if (model.IsAuthenticate()) { //return Redirect("/Login/Phoneverification"); return(Redirect("/Shangpin/Brand/AIIBrandsSelect")); } ViewBag.Flag = flag; ViewBag.Msg = msg; ViewBag.Checked = "0"; ViewBag.UserName = string.Empty; string userName = PresentationHelper.GetCookie("RemberOCSUser"); if (!string.IsNullOrEmpty(userName)) { ViewBag.Checked = "1"; ViewBag.UserName = userName; } return(View()); }