NinjectWebCommon.RegisterServices メソッドで HttpContextBase のバインディングを作成しましたが、コントローラーまたはサービスでそれを参照しようとすると、エラー メッセージが表示されます。
バインディングは次のとおりです。
kernel.Bind<HttpContextBase>().ToMethod(context => new HttpContextWrapper(HttpContext.Current)).InRequestScope();
エラーメッセージは次のとおりです。
Error activating HttpContextBase
More than one matching bindings are available.
Activation path:
2) Injection of dependency HttpContextBase into parameter abase of constructor of type HomeController
1) Request for HomeController
Suggestions:
1) Ensure that you have defined a binding for HttpContextBase only once.
バインディングを削除すると、希望どおりに動作するように見えますが (HttpContextWrapper に解決されます)、これがどのように登録されるのか疑問に思っています。