public ActionResult Register(RegisterModel model) { CustomMembershipProvider customMembershipProvider = new CustomMembershipProvider(); if (ModelState.IsValid) { Result result = customMembershipProvider.RegisterCustomer(model.GetUserSession()); if (result.Status == ResultStatus.Ok) { return(RedirectToAction("Index", "Home")); } else { ModelState.AddModelError("", "Error : " + result.Message); return(View()); } } ModelState.AddModelError("", "Error : El usuario o la clave no son vĂ¡lidos. "); return(View()); }