//[ValidateAntiForgeryToken] public ActionResult AdministratorEntrance(string UserName, string Password) { try { IBL bl = new BLImplement(); if (bl.isAdministrator(UserName, Password)) { return(RedirectToAction("AdministratorOptions", "Administrator", bl.getAllAdministrators().FirstOrDefault(a => a.UserName == UserName && a.Password == Password))); } else { return(RedirectToAction("AdministratorEntrance")); } } catch (Exception ex) { ViewBag.Message = String.Format(ex.Message); return(RedirectToAction("AdministratorEntrance")); } }