Hi,
We are using version 8 of the CMS and we often get lots of these errors - any ideas what might be causing it?
System.Exception: Failed to create an instance of controller type HE.Core.V8.Controllers.ArchiveController (see inner exception). ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Umbraco.Web.Runtime.WebInitialComposer.<>c.<Compose>b__0_6(IFactory factory) in D:\a\1\s\src\Umbraco.Web\Runtime\WebInitialComposer.cs:line 121
at Umbraco.Core.FactoryExtensions.GetInstance[T](IFactory factory) in D:\a\1\s\src\Umbraco.Core\FactoryExtensions.cs:line 23
at Umbraco.Web.Mvc.UmbracoController..ctor() in D:\a\1\s\src\Umbraco.Web\Mvc\UmbracoController.cs:line 76
at Umbraco.Web.Mvc.RenderMvcController..ctor() in D:\a\1\s\src\Umbraco.Web\Mvc\RenderMvcController.cs:line 23
at DynamicMethod(Object[] )
at LightInject.PerRequestLifeTime.GetInstance(Func`1 createInstance, Scope scope) in C:\projects\lightinject\src\LightInject\LightInject.cs:line 6207
at Umbraco.Web.Mvc.ContainerControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) in D:\a\1\s\src\Umbraco.Web\Mvc\ContainerControllerFactory.cs:line 21
--- End of inner exception stack trace ---
at Umbraco.Web.Mvc.ContainerControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) in D:\a\1\s\src\Umbraco.Web\Mvc\ContainerControllerFactory.cs:line 25
at Umbraco.Web.Mvc.UmbracoControllerFactory.CreateController(RequestContext requestContext, String controllerName) in D:\a\1\s\src\Umbraco.Web\Mvc\UmbracoControllerFactory.cs:line 38
at Umbraco.Web.Mvc.RenderControllerFactory.CreateController(RequestContext requestContext, String controllerName) in D:\a\1\s\src\Umbraco.Web\Mvc\RenderControllerFactory.cs:line 36
at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
It looks like a missing service in the DI container. Check if the services that get injected into the ArchiveController are all there. I've seen vague errors like these when it was not the ArchiveController itself which was the problem, but a service that was injected into the ArchiveController.
I have seen this problem today with a v8 project and I can confirm that it was due to a missing service in the DI container, just like Luuk Peters mentioned in their comment.
Failed to create an instance of controller Error
Hi, We are using version 8 of the CMS and we often get lots of these errors - any ideas what might be causing it?
Thanks
It looks like a missing service in the DI container. Check if the services that get injected into the ArchiveController are all there. I've seen vague errors like these when it was not the ArchiveController itself which was the problem, but a service that was injected into the ArchiveController.
I have seen this problem today with a v8 project and I can confirm that it was due to a missing service in the DI container, just like Luuk Peters mentioned in their comment.
is working on a reply...