public ActionResult ResetPassword(string userName) { try { if (UserInfo.isUsernameExist(userName)) { string passwordhash = ConfigurationManager.AppSettings["PasswordHash"]; string securityStamp = ConfigurationManager.AppSettings["SecurityStamp"]; ForgotPassword.Reset(userName, passwordhash, securityStamp); ViewBag.SuccessMsg = "Your password has been changed successfully!"; } else { ViewBag.ErrorMsg = "Username not found"; } } catch (Exception) { throw; } return(View()); }