public ActionResult Resetpassword(string token) { ViewBag.Token = token; if (string.IsNullOrEmpty(token)) { return(new HttpNotFoundResult()); } UserToken usertoken = iusertoken.Get(Guid.Parse(token)); string tokentimeout = System.Configuration.ConfigurationManager.AppSettings["tokentimeout"]; if (usertoken == null || DateTime.Now.Subtract(DateTime.Parse(usertoken.Createtime)).TotalMinutes > int.Parse(tokentimeout)) { return(RedirectToAction("TokenTimeOut")); } ViewBag.Userid = usertoken.Userid.ToString(); return(View()); }