public UsuarioMembership(Usuario us) { var clave = ConfigurationManager.AppSettings["ClaveCifrado"]; idUsuario = us.idUsuario; Rol = us.Rol.nombre; login = us.login; }
public ActionResult Index(Usuario model) { if (Membership.ValidateUser(model.login, model.password)) { //HttpContext.Application["horaLogin"] = DateTime.Now; //TempData["horaLogin"] = DateTime.Now; Session["horaLogin"] = DateTime.Now; FormsAuthentication.RedirectFromLoginPage(model.login,false); return null; } return View(model); }