-
Notifications
You must be signed in to change notification settings - Fork 48
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
Ninject causes global WebApi filter to be called twice #10
Comments
How are you useing Filters? Filter Attributes, Filters configured globally? Filters configured using the Filter extension of Ninject? |
This is regarding a standard Global Action Filter, not using Dependency Injection: |
I've made a sample repo here to show the issue: https://github.com/Lavinski/WebApi-Ninject |
Up on this, we've faced with same issue. Config applied via |
Faced the same issue.
After:
Found few workarounds: There should be a more intelligent way to solve this issue. |
I have to try to unregister the default filters provider but couldn't able to unregister it. following statement for unregister throws an exception that tells sequence contain no matching element
could you please help me out how to Unregister |
any updates on this. We are basically trying to add ordering in action filters in webapi. But are blocked by this. |
Hello, |
I solved my problem just by setting AllowMultiple to false |
I have a basic Web.Api only project (no MVC), with a global ActionFilter being called twice. I've narrowed the issue down to the NinjectWebCommon file. It looks like calling bootstrapper.Initialize changes something causing the filter to run twice.
It looks like the issue only effect the OnActionExecuting but not the OnActionExecuted method.
Is this a known issue with Ninject and is there a way I prevent the ActionFilter from being invoked twice?
The text was updated successfully, but these errors were encountered: