Hi I`m trying to do something that seems kinda easy, and is documented that way but for some reason its not going that easy.
Basiclly I wrote something like this:
public class CacheControllAttribute : ActionFilterAttribute
{
public override void OnResultExecuting(ResultExecutingContext filterContext)
{
//do something
base.OnResultExecuting(filterContext);
}
}
However when i try and use this on an action result like this:
[CacheControllAttribute]
public ActionResult SomeAction()
{
//whatever
}
My custom overriden function never gets called…
any ideas on this? or how to implement this differently?
Finally figured out, it was in the end the fact that I have been putting the filter on a function that has in fact been an ActionResult function, but it was returned by another method that called it, so the filters are only being executed once on the entry point Action.