public ActionResult Index() { //Autoadding new User to database if User attends web application at first time try { CustomRoleProvider.UserValidation(unit); ViewBag.currentUser = CustomRoleProvider.currentUser; return(View()); } catch (ProviderIncompatibleException ex) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound, "No database connection!")); } }
public ActionResult Administration() { CustomRoleProvider.UserValidation(unit); ViewBag.currentUser = CustomRoleProvider.currentUser; return(View()); }