Questions tagged [ninject.web]

55 questions
7
votes
1 answer

Cannot upgrade Ninject to latest version in Nuget

I have a ASP.NET WebForms application that uses some Ninject packages, but I am stuck at a certain version. When I try to upgrade to the latest version, I get "Unable to resolve dependencies" issues. The packages in question are: Package …
Chris Walsh
  • 3,423
  • 2
  • 42
  • 62
6
votes
1 answer

ASP.NET MVC 3 and Global Filter Injection

Hello am an trying to implement a global filter with injection. The filter looks like this. public class WikiFilter : IActionFilter { private IWikiService service; public WikiFilter(IWikiService service) { this.service =…
Androme
  • 2,399
  • 4
  • 43
  • 82
6
votes
1 answer

Ninject Intermittent exception thrown related to OnePerRequestModule

I just upgraded an existing implementation of Ninject from 1.5 to 2.0. I'm now seeing an intermittent exception getting thrown when many requests are happening in a short period of time. Here's the exception that is being thrown. Type:…
reifnir
  • 143
  • 1
  • 5
6
votes
1 answer

Using ninject with Ninject.Web.Api for Web Api 2 is not working in ASP.NET MVC 5

I am developing an Asp.NET MVC project. My project has web api as well. I am using ASP.NET MVC5 and Web Api 2 with Visual Studio 3. I am doing dependency injection using ninject. I know ninject for web is not working for Web Api 2. So I tried to use…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
5
votes
1 answer

ASP.NET MVC 2, Ninject 2.2 and no parameterless constructor defined for this object

So I've been spending some time with ASP.NET MVC 2 (currently stuck with using Visual Studio 2008) and have now moved onto using Ninject 2.2 and its MVC integration. I've downloaded Ninject 2.2 and Ninject.Web.Mvc from the following…
Jonathon Watney
  • 20,248
  • 9
  • 38
  • 40
5
votes
1 answer

Ninject per session singleton?

So I'm trying to introduce the concept of a user to my application and have got my own set of custom login routines etc. working fine. In my module, I'm binding my IUserSession to my implementation and InSingletonScope. Now I suspect this was the…
tbddeveloper
  • 2,407
  • 1
  • 23
  • 39
5
votes
2 answers

Ninject 3 - Does BeginBlock() override InRequestScope in asp.net WebAPI?

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 from NuGet. Then, I Implemented IDependencyResolver…
Umair Ishaq
  • 752
  • 9
  • 22
5
votes
3 answers

Ninject throws Activation Exception in a WebApi project with multiple assemblies

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 from NuGet. Then, I Implemented IDependencyResolver…
4
votes
4 answers

Ninject.Web.Common throwing ActivationException trying to inject dependencies into HttpApplicationInitializationHttpModule

I'm not sure where to even begin solving this, but I'm getting an exception when trying to run my ASP.NET MVC app. Here is the error I'm getting: [ActivationException: Error activating IntPtr No matching bindings are available, and the type is not…
devuxer
  • 41,681
  • 47
  • 180
  • 292
4
votes
2 answers

Ninject woes... 404 error problems

We are using the beloved Ninject+Ninject.Web.Mvc with MVC 2 and are running into some problems. Specifically dealing with 404 errors. We have a logging service that logs 500 errors and records them. Everything is chugging along just perfectly…
Josh Barker
  • 1,203
  • 1
  • 11
  • 28
4
votes
1 answer

Unable to find NinjectWcfApplication reference when try to install nInject for WCF

I want to add nInject into WCF service and i followed below steps. http://www.aaronstannard.com/post/2011/08/16/dependency-injection-ninject-wcf-service.aspx Problem: I am not able to find NinjectWcfApplication class to inherit for…
4
votes
0 answers

Ninject bug resolving constructor with multiple string parameters

I'm running into what looks like a bug using Ninject 3 with an MVC WebAPI / Windows Azure project. I have a repository object that looks something like this: public class Repository : IRepository { /// /// Initialize a new…
superstator
  • 3,005
  • 1
  • 33
  • 43
4
votes
1 answer

Ninject 3 in WebForms

I'm getting an the following error when I try and start my WebForms application, with Ninject.Web (v3) installed. "The static container already has a kernel associated with it!" I'm implementing Ninject in Global.asax inheriting from…
ActualAl
  • 1,192
  • 10
  • 13
4
votes
1 answer

Ninject w/ ASMX web service in a MVC3/Ninject 3 environment

I'm looking for the best way to incorporate a classic asmx web service into my MVC3 environment. I'd like the kernel/container to be shared between the two. In the past with ASP.NET web forms I was able to use the…
Nate Rickard
  • 652
  • 8
  • 14
3
votes
1 answer

Can Ninject inject a class and make it reference the target class as a back reference?

I want to inject a presenter into my webform class. While doing so I would like the injected presenter to contain a reference to the view it is being injected into. Inject a class with a reference to the class it is injected into. Is it possible to…
1
2 3 4