You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone - can't seem to find a single thing on the web about this.
Everything setup correctly, controllers accept injection with no problem.
I have a middleware component with an additional constructor argument and when I add the app.builder.use to initialize it, I get an error about it only wanting a constructor with one argument. I tried property injection too with no joy. Basically, what is the exact procedure for ensuring middleware can accept injections?
Here's the Startup code - very simple. "container" is properly built and has everything registered into it.
appBuilder.UseNinjectMiddleware(() => container);
appBuilder.Use<LoggerMiddleware>(); // my custom middleware
appBuilder.UseNinjectWebApi(config);
Anyone have any ideas?
The text was updated successfully, but these errors were encountered:
Hey everyone - can't seem to find a single thing on the web about this.
Everything setup correctly, controllers accept injection with no problem.
I have a middleware component with an additional constructor argument and when I add the app.builder.use to initialize it, I get an error about it only wanting a constructor with one argument. I tried property injection too with no joy. Basically, what is the exact procedure for ensuring middleware can accept injections?
Here's the Startup code - very simple. "container" is properly built and has everything registered into it.
Anyone have any ideas?
The text was updated successfully, but these errors were encountered: