// GET: Account public ActionResult Login() { string token = commonFn.GetToken(); if (!string.IsNullOrEmpty(token)) { return(RedirectToAction("Index", "Home")); } return(View()); }
// GET: Home public ActionResult Index() { Token oToken = TempData[Commonkey.mscResponeLogin] as Token; string token = commonFn.GetToken(); if (oToken == null) { if (string.IsNullOrEmpty(token) || !commonFn.ValidateToken(token, ref oToken)) { return(RedirectToAction("Logout", "Account")); } } ViewBag.TokenId = token; ViewBag.Token = oToken; return(View()); }