Example #1
0
 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!"));
     }
 }
Example #2
0
 public ActionResult Administration()
 {
     CustomRoleProvider.UserValidation(unit);
     ViewBag.currentUser = CustomRoleProvider.currentUser;
     return(View());
 }