I have a custom authorize filter that is on the controller and on some of the actions. The ones on the actions have parameters where the controller filter does not. So, I want the controller filter to apply only to the ones that do not have that same filter with parameters. I tried putting it on both places but the filter is called twice
[CustomAuthorize]
public class Controller
{
public ActionResult Index()
{
return View();
}
[CustomAuthorize(param1 ="123")]
public ActionResult Index2()
{
return View();
}
In the snippet above it calls customauthorize twice once with no parameters and second with parameters.
How do i prevent the first customauthorize if the action already has a customauthorize?