Linked Questions

62 votes
3 answers
40k views

There's a great question here: How to add Web API to an existing ASP.NET MVC 4 Web Application project? Unfortunately, it wasn't enough to solve my problem. I've tried twice to be sure I haven't done ...
Luis Gouveia's user avatar
  • 8,955
4 votes
1 answer
4k views

So I have the exact opposite problem as MVC5, Web API 2 and Ninject I have a new MVC5/WebAPI2 project, that has both "Controller"s and "ApiControllers". I'm using the latest unstable version of ...
Tim's user avatar
  • 475
3 votes
1 answer
1k views

I'm using Ninject.MVC3 with WebAPI. Originally, I was using the implementation of NinjectResolver and NinjectScope as outlined here,i.e. using _kernel.BeginBlock(), I noticed that BeginBlock() gets ...
Abhijeet Patel's user avatar
1 vote
1 answer
4k views

I am trying to set up a brand new project using MVC 5 and the latest Ninject.MVC5 nuget package. However I am getting a "No parameterless constructor defined for this object" exception. I have ...
Dan's user avatar
  • 7,794
1 vote
1 answer
2k views

i have a simple controller where i am using the interfaec like this , public class HomeController : Controller { // GET: Home private IHotelService hotelService; public HomeController(...
Gaurav shukla's user avatar
0 votes
1 answer
1k views

In web api controller, I used to create instance within using keyword so Once it come out from the using, GC will be called and memory will be released. The code which I'm using right now, public ...
King_Fisher's user avatar
  • 1,223
0 votes
1 answer
2k views

I'm struggling with enabling Ninject's constructor injection in a Web Service application. Here's the steps I took (Visual Studio 2013): 1) Created a new project with "ASP.NET Web Application" ...
Piotr's user avatar
  • 592
0 votes
1 answer
1k views

I am developing an ASP.NET MVC application. In my application, I need to provide REST API. So I added Web Api 2 to my existing MVC application. Before I added Web API 2, I was using ninject for ...
Wai Yan Hein's user avatar
  • 14.9k
2 votes
1 answer
585 views

I tried the solution in MVC5, Web API 2 and and Ninject but the package breaks my build(System.Web). I have also tried the "Ninject.MVC3" Package. When i fix it with "Update-Package -reinstall ...
Dexter Le Blanc Jr.'s user avatar
2 votes
1 answer
543 views

I've read every Stack Overflow question I can find but to no avail. When I installed the Ninject packages through NuGet, the NinjectWebCommon.cs class was not installed, so I coded up my own (below). ...
Ron's user avatar
  • 917
0 votes
1 answer
335 views

When I run my WebAPI project from Visual Studio it runs perfectly. But when I publish to the file system and copy the files to my IIS folder and run it, it fails with the error: An error occurred when ...
Legion's user avatar
  • 3,529