Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6861363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:31:30+00:00 2026-05-27T02:31:30+00:00

I have a solution with a MVC Web Project, Infrastructure project, Services project and

  • 0

I have a solution with a MVC Web Project, Infrastructure project, Services project and Data project. I installed ninject from NuGet in Visual Studio. It created a folder in my Web project called “App_Start” and put the Ninject code file in there and my application works completely fine.

My problem is that I have a need to resolve a dependency outside the web project that is a property or in a constructor.

I have tried this in one of my classes in my services project:

    var m_customerService = DependencyResolver.Current.GetService(typeof(ICustomerService));

This returns null every single time. When I try this exact same thing in my HomeController for example, it returns exactly what I expect.

I suspect that it has something to do with how the projects are referencing each other. My Web project obviously references all the other projects. I thought about moving the Ninject start up code to my Infrastructure project so that I will have access to it anywhere. Does that make sense to do? Has anybody else had this problem or is there something that I am missing?

Any help on this would awesome. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:31:30+00:00Added an answer on May 27, 2026 at 2:31 am

    I have fixed the issue. I moved Ninject to another project that spans all the projects in my solution and my service classes seem to by working correctly now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have a Visual Studio solution and an ASP.NET MVC project that uses
I have a Visual Studio 2010 MVC 3 web solution containing a number of
We have an ASP.Net MVC 1.0 solution developed using Visual Studio 2008 and .net
I have upgraded my solution from VS2008. In our web project there are 2
I have an MVC solution setup like this, with three 'projects'. Web (MVC Project,
I have the following project solution: There is a ASP.NET MVC Web Application where
Going mad now. I have a MVC solution that i've upgraded from MVC 1
I have a Class Library project and MVC project in the one solution. My
I have a .NET solution containing two projects: An ASP.NET MVC project, 'Website' A
This is the weirdest error I have ever encountered. This MVC web project was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.