No Parameterless Constructor Defined for this Object

Error: No parameterless constructor defined for this object first arises comes when you create a project to implement dependency injection in Asp.net MVC. In Asp.Net MVC Dependency Injection.

Follow these Steps to Solve the Error.

Error: No parameterless constructor is define for this object in dependency injection in MVC

  • Go to the Project Solution in Visual Studio
Visual studio project solution
  • Find Global.asax file in the solution
Global.asax file in project solution
  • Paste this code in global.asax file in the Application start method
UnityConfig.RegisterComponents();
UnityConfig.RegisterComponents();
  • That’s it.
  • Watch the Video below.

10 thoughts on “No Parameterless Constructor Defined for this Object”

Leave a Comment