ninject-extensions Questions

3

I am working on an ASP.NET MVC application. I have initialized my LoggerFactory in a static class which is called from Global.asax using Microsoft.Extensions.Logging; using Serilog; using System....

5

Solved

I'm starting a web application with MVC3 and Ninject. There is one dependency that I also need in the Global.asax file that needs to be a singleton. I thought it should be like this: public class...
Aquavit asked 1/4, 2011 at 10:21

2

I originally had used some custom code I found to handle the dependency resolution in Web API and it worked fine. The issue I ran into was that I wanted to bind a filter to my controller scopes jus...
Adjunction asked 3/6, 2014 at 15:33

2

Solved

I am having a problem using Log4Net (1.2.10) through Ninject's (2.2.1.4) Extensions.Logging.Log4net (2.2.0.4), as installed through NuGet. When I access Log4Net directly: var logger = log4net.Log...
Collected asked 29/8, 2011 at 8:9

3

Solved

I'm getting the following error: Test method: BootStrapperTest.Can_Create_Alert_Management_Object threw exception: Ninject.ActivationException: Error activating IAlertManagement No matching bindi...
Selfloading asked 8/8, 2012 at 12:13

1

Solved

(This question was first asked in the Ninject Google Group, but I see now that Stackoverflow seems to be more active.) I'm using the NamedScopeExtension to inject the same ViewModel into both the ...
Danit asked 20/8, 2015 at 9:15

3

Solved

Using the Ninject Factory extension, you can automatically generate factories, and let the factory pass parameters to the class' constructor. The following test passes: public interface IBar { in...
Anterior asked 27/6, 2012 at 10:54

1

Solved

Does anyone have a clear instruction on how to setup Ninject in WCF? been googling around but I cant see any updated guidelines on how to use Ninject in WCF.
Melissiamelita asked 3/8, 2014 at 7:29

1

Solved

I use Ninject mainly as manual binding like bellow. Which is working properly kernel.Bind<TestContext>().ToSelf().InRequestScope(); kernel.Bind<ITestRepository>().To<TestRepository&...

3

Solved

My asp.net WebApi project comprises of multiple assemblies for Services, Core and Data Access. In an attempt to use Ninject as my DI container in the project, I added Ninject.Web.Common package fro...
Burget asked 12/11, 2012 at 16:12

2

Solved

I'm using Ninject and the extensions EventBroker and DependencyCreation in an MVC 3 application. I've installed and am using the Ninject.MVC3 package and therefore the OnePerRequestModule. I'm att...

1

Solved

I'm trying to expand on the scenario asked in the SO question titled Ninject Factory Extension Bind Multiple Concrete Types To One Interface by using Ninject Conventions for convention-based bindi...

1

I try to use the MoqMockingKernel class. (Ninject.MockingKernel.Moq) from the Ninject.MockingKernel Extension for a unit test. At initializing the MoqMockingKernel I'm getting the following error:...
Heretofore asked 8/11, 2012 at 10:7

1

Solved

Can the Ninject concepts of scope, context, named binding, (and activation block?) be separated and explained clearly at a conceptual level? As an example, I have a service that loads data records...
Neutrality asked 29/1, 2013 at 23:6

1

Solved

I've noticed in the tutorials for interception that you can target a method and intercept it. I.e. Kernel.Bind<Foo>().ToSelf(); Kernel.InterceptReplace<Foo>(foo => foo.ThrowsAnErr...

1

Solved

I'm learning to use Ninject and Interceptor pattern. I have the following interceptor. public class MyInterceptor:IInterceptor { public void Intercept(IInvocation invocation) { Console.WriteLi...

1

Solved

I'm using Ninject (3.0) in my ASP.Net MVC3 project. At some point of request handling I want to execute some tasks. I'm using session-per-request pattern but don't want these tasks to share the sa...
Kahler asked 9/6, 2012 at 4:49

2

Solved

Recently, I upgraded one of my MVC3 projects from Ninject 2 to Ninject 3. After a couple of minutes trying to find why InRequestScope was not anymore available, I found that this is now an extensi...
Interpretation asked 14/5, 2012 at 21:18

1

When I try to use the ToFactory in Ninject, I get Ninject.ActivationException var test = new StandardKernel(); test.Bind<IFoo>().To<Foo>(); test.Bind<IFooFactory>().ToFactory(); ...
Catalase asked 7/5, 2012 at 9:5

1

Solved

I am currently using Ninject (2.2.1.4) and Ninject.Extensions.Wcf (2.2.0.4) with my WCF service. I would like to upgrade to Ninject (3.0.0.15) and Ninject.Extensions.Wcf (3.0.0.5) and it doesn't lo...
Procrastinate asked 30/4, 2012 at 21:26

2

Solved

The essence of my question is how to compose these objects (see below) in a sensible way with MVC3 and Ninject (though I am not sure DI should be playing a role in the solution). I can't disclose t...

1

Solved

I'm using the Ninject Factory Extension and creating a custom instance provider explained in the wiki: class UseFirstArgumentAsNameInstanceProvider : StandardInstanceProvider { protected override...
Seafowl asked 2/4, 2012 at 20:17

1

Solved

I have two projects in my solution... a domain project and MVC3 web project (e.g. MyApp.Domain and MyApp.Web). Previously, when using Ninject.Extensions.Conventions ver. 2, I was able to use the fo...
Toastmaster asked 22/3, 2012 at 14:59

1

Solved

I'm looking at the Ninject Factory extension at the following link: http://www.planetgeek.ch/2011/12/31/ninject-extensions-factory-introduction/ I'm trying to wrap my head around the extension and...
Walther asked 23/2, 2012 at 15:34

2

Solved

I have a WCF 4 service with 2 endpoints configured to use wsHttpBinding and netTcpBinding. I am hosting the service within IIS 7.5 using WAS and am using the Ninject WCF extension to DI into my ser...
Phenolic asked 27/3, 2011 at 19:1

© 2022 - 2024 — McMap. All rights reserved.