Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filters provided via dependency injection are called in the same order pre- & post-action #16

Closed
richarddbarnett opened this issue Aug 26, 2016 · 3 comments

Comments

@richarddbarnett
Copy link

If 2 filters A & B are provided for a controller via depedency injection & OnActionExecuting is called for filter A & then filter B, then OnActionExecuted is called for A & then B.

If the same filters are added to HttpConfiguration.Filters then OnActionExecuted is called for B & then A, which I think is the correct order.

Observed using Autofac 3.5.2, Autofac.WebApi2 3.4.0.

@richarddbarnett
Copy link
Author

richarddbarnett commented Aug 26, 2016

This also affects the 4.x branch.

@tillig
Copy link
Member

tillig commented Oct 25, 2016

Verified. We need to run that in the reverse order on action executed. Great catch! Thanks!

tillig pushed a commit that referenced this issue Oct 25, 2016
@tillig
Copy link
Member

tillig commented Oct 25, 2016

This is fixed in v4.0.2-CI-234 on the MyGet feed and will be available in the next push to NuGet.

@tillig tillig closed this as completed Oct 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants