Server Error in '/' Application.

Unable to resolve type: Katapult.Core.Abstractions.Models.IViewModel, service name: NSBE.ArticleSearchPage

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Unable to resolve type: Katapult.Core.Abstractions.Models.IViewModel, service name: NSBE.ArticleSearchPage

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: Unable to resolve type: Katapult.Core.Abstractions.Models.IViewModel, service name: NSBE.ArticleSearchPage]
   LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) +212
   LightInject.ServiceContainer.CreateNamedDelegate(Tuple`2 key, Boolean throwError) +145
   LightInject.ServiceContainer.GetInstance(Type serviceType, String serviceName) +270
   LightInject.ServiceFactoryExtensions.GetInstance(IServiceFactory factory, String serviceName) +66
   Katapult.Infrastructure.Kentico.Extensions.<>c__DisplayClass0_0.<RegisterKenticoServices>b__3(String className) in C:\projects\nsbe-2022\Server\Katapult.Infrastructure.Kentico\Extensions\DependencyInjectionEngineExtensions.cs:43
   Katapult.Infrastructure.Kentico.Configuration.ViewModelFactory.CreateViewModel(ICurrentNodeProvider currentNodeProvider, Func`2 getByClassNameFunction) in C:\projects\nsbe-2022\Server\Katapult.Infrastructure.Kentico\Configuration\ViewModelFactory.cs:36
   LightInject.Scope.GetScopedInstance(GetInstanceDelegate getInstanceDelegate, Object[] arguments, Int32 instanceDelegateIndex) +228
   DynamicMethod(Object[] , Scope ) +184
   DynamicMethod(Object[] , Scope ) +129
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +64

[InvalidOperationException: An error occurred when trying to create a controller of type 'Katapult.Infrastructure.Kentico.Controllers.KenticoPageController'. Make sure that the controller has a parameterless public constructor.]
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +245
   System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +103
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +266
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +77
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1128
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0