In ASP.NET MVC 4 and below we just add the following in Global.asax:
GlobalFilters.Filters.Add(new AuthorizeAttribute() { Roles = \"Admin, S
In case if you are using the Razor Page flavor of the ASP.NET Core 2.0 you could add global filters as follows:
services.AddMvc()
.AddRazorPagesOptions(options =>
{
options.Conventions.AuthorizeFolder("/"); // Require users to be authenticated.
options.Conventions.AuthorizeFolder("/", "YourPolicyName"); // Require a policy to be full filled globally.
});