In writing this answer, I was asked if there are guarantees about the behaviour of the ActionFilterAttribute. and I was unable to answer with confidence.
In particular, are all four of the methods OnActionExecuted
, OnActionExecuting
, OnResultExecuted
& OnResultExecuting
guaranteed to be called for all requests that pass through the attribute, or are there circumstances (such as exceptions, dropped connection etc) where one or more of the phases might not fire?