UpTheCreek
UpTheCreek

Reputation: 32391

ASP.NET-MVC: Order of OnActionExecuted execution between controller and attributes

Does anyone know what the rules are for order of execution of OnActionExecuted in

  1. An overridden OnActionExecuted method in the controller/base controller, and
  2. An OnActionExecuted method in an Attribute/ActionFilter applied to the Action?

Is the order guaranteed?

Upvotes: 2

Views: 647

Answers (1)

Darren Lewis
Darren Lewis

Reputation: 8488

Overridden controller methods are always higher in the filter stack and will therefore get called first and order is guaranteed.

Upvotes: 2

Related Questions