ASP.NET MVC 5: Custom authentication with OnActionExecuting

Although i prefer the AuthorizeAttribute solution, there is an other simpler way with a base Controller and OnActionExecuting:

Let’s assume the following Controller:

 

public class MemberController : Controller {
    public ActionResult Index() {
       //Stuff for members only
    }
}

Continue reading