Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Scarry 22 posts 92 karma points
    Aug 14, 2023 @ 19:41
    Chris Scarry
    0

    Umbraco v8 Upgrade

    I need some help with my site after migrating from version 7.14.x to 8.5.5. I got it up and running and was able to successfully complete the db migration upgrade process. I moved my files into the new project and fixed all errors causing it not to build/compile. However, now when it loads I get errors about how the boot failed: Unable to resolve type: Umbraco.Core.Composing.ComponentCollection

    I've been struggling with this for days and not getting anywhere.

    Server Error in '/' Application.
    

    Boot failed: Umbraco cannot run. See Umbraco's log file for more details.

    -> Umbraco.Core.Exceptions.BootFailedException: Boot failed.

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Core.Composing.ComponentCollection, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.FactoryExtensions.GetInstance[T](IFactory factory) at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer)

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Forms.Core.Components.UmbracoFormsComponent, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>c__DisplayClass197_0.<ResolveEmitMethod>b__1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Components.UmbracoFormsComponent], [Parameter: workflowServices(Umbraco.Forms.Core.Services.IWorkflowServices)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowServices, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Unresolved dependency [Target Type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember], [Parameter: recordService(Umbraco.Forms.Core.Services.IRecordService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IRecordService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Services.RecordService], [Parameter: workflowService(Umbraco.Forms.Core.Services.IWorkflowService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.2(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass153_0.0(IEmitter ms) at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Recursive dependency detected: ServiceType:MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, ServiceName:] at LightInject.ServiceContainer.<>cDisplayClass153_0.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) 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: Umbraco.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.

    -> Umbraco.Core.Exceptions.BootFailedException: Boot failed.

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Core.Composing.ComponentCollection, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.FactoryExtensions.GetInstance[T](IFactory factory) at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer)

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Forms.Core.Components.UmbracoFormsComponent, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>c__DisplayClass197_0.<ResolveEmitMethod>b__1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Components.UmbracoFormsComponent], [Parameter: workflowServices(Umbraco.Forms.Core.Services.IWorkflowServices)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowServices, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Unresolved dependency [Target Type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember], [Parameter: recordService(Umbraco.Forms.Core.Services.IRecordService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IRecordService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Services.RecordService], [Parameter: workflowService(Umbraco.Forms.Core.Services.IWorkflowService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.2(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass153_0.0(IEmitter ms) at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Recursive dependency detected: ServiceType:MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, ServiceName:] at LightInject.ServiceContainer.<>cDisplayClass153_0.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    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:

    [BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.

    -> Umbraco.Core.Exceptions.BootFailedException: Boot failed.

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Core.Composing.ComponentCollection, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.FactoryExtensions.GetInstance[T](IFactory factory) at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer)

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Forms.Core.Components.UmbracoFormsComponent, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>c__DisplayClass197_0.<ResolveEmitMethod>b__1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Components.UmbracoFormsComponent], [Parameter: workflowServices(Umbraco.Forms.Core.Services.IWorkflowServices)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowServices, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Unresolved dependency [Target Type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember], [Parameter: recordService(Umbraco.Forms.Core.Services.IRecordService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IRecordService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Services.RecordService], [Parameter: workflowService(Umbraco.Forms.Core.Services.IWorkflowService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.2(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass153_0.0(IEmitter ms) at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Recursive dependency detected: ServiceType:MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, ServiceName:] at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)] Umbraco.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException) +632 Umbraco.Web.<>c.

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Aug 15, 2023 @ 08:56
    Marc Goodson
    0

    Hi Chris

    if you look further down the stack trace, it looks like there is an issue with your custom code?

    MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember

    Do you have a custom Workflow provider for Umbraco Forms?

    It looks like the Workflow maybe being autoscanned by DI, but requires the IRecordService in it's constructor and somehow that isn't registered with DI...?

    System.InvalidOperationException: Unresolved dependency [Target Type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember], [Parameter: recordService(Umbraco.Forms.Core.Services.IRecordService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IRecordService, ServiceName:] 
    

    So either Umbraco Forms needs an upgrade, or the WorflowType is written differently or you need to register IRecordService with lightinject, or I've completely misunderstand and it's something else earlier in the trace!

    regards

    marc

  • Chris Scarry 22 posts 92 karma points
    Aug 15, 2023 @ 12:48
    Chris Scarry
    0

    Hey Marc,

    Thanks for the reply! I do have some custom workflow providers for Umbraco Forms. I did upgrade Umbraco Forms to the latest version for v8 it is at the latest stable version 8.13.10 after I upgraded the site itself to b 8.5.5. I will try and exclude this file and see if that helps me out. If it does then I will fix this error in the file and then try and rebuild. Thank you again for the reply and the helpful tip!

  • Chris Scarry 22 posts 92 karma points
    Aug 15, 2023 @ 20:41
    Chris Scarry
    0

    So, I added a component for the WorkFlows but am still getting the errors.

    Here is the code from my Component file:

    namespace MyProject.Components {

    public class WorkFlowComposer : ICoreComposer {

        public void Compose(Composition composition)
        {
            composition.Register<IRecordService, SaveAsUmbracoBusinessMember>(Lifetime.Singleton);
            composition.Register<IRecordStorage, SaveAsUmbracoBusinessMember>(Lifetime.Singleton);
            composition.Register<IRecordService, SaveAsUmbracoMember>(Lifetime.Singleton);
            composition.Register<IRecordStorage, SaveAsUmbracoMember>(Lifetime.Singleton);
        }
    }
    

    }

    Server Error in '/' Application.
    

    Boot failed: Umbraco cannot run. See Umbraco's log file for more details.

    -> Umbraco.Core.Exceptions.BootFailedException: Boot failed.

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Core.Composing.ComponentCollection, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.FactoryExtensions.GetInstance[T](IFactory factory) at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer)

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Forms.Core.Components.UmbracoFormsComponent, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>c__DisplayClass197_0.<ResolveEmitMethod>b__1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Components.UmbracoFormsComponent], [Parameter: workflowServices(Umbraco.Forms.Core.Services.IWorkflowServices)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowServices, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Unresolved dependency [Target Type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember], [Parameter: recordService(Umbraco.Forms.Core.Services.IRecordService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IRecordService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Services.RecordService], [Parameter: workflowService(Umbraco.Forms.Core.Services.IWorkflowService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.2(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass153_0.0(IEmitter ms) at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Recursive dependency detected: ServiceType:MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, ServiceName:] at LightInject.ServiceContainer.<>cDisplayClass153_0.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) 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: Umbraco.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.

    -> Umbraco.Core.Exceptions.BootFailedException: Boot failed.

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Core.Composing.ComponentCollection, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.FactoryExtensions.GetInstance[T](IFactory factory) at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer)

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Forms.Core.Components.UmbracoFormsComponent, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>c__DisplayClass197_0.<ResolveEmitMethod>b__1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Components.UmbracoFormsComponent], [Parameter: workflowServices(Umbraco.Forms.Core.Services.IWorkflowServices)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowServices, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Unresolved dependency [Target Type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember], [Parameter: recordService(Umbraco.Forms.Core.Services.IRecordService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IRecordService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Services.RecordService], [Parameter: workflowService(Umbraco.Forms.Core.Services.IWorkflowService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.2(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass153_0.0(IEmitter ms) at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Recursive dependency detected: ServiceType:MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, ServiceName:] at LightInject.ServiceContainer.<>cDisplayClass153_0.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    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:

    [BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.

    -> Umbraco.Core.Exceptions.BootFailedException: Boot failed.

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Core.Composing.ComponentCollection, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.FactoryExtensions.GetInstance[T](IFactory factory) at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer)

    -> System.InvalidOperationException: Unable to resolve type: Umbraco.Forms.Core.Components.UmbracoFormsComponent, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.ComponentCollectionBuilder.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>c__DisplayClass197_0.<ResolveEmitMethod>b__1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>c__DisplayClass153_0.<CreateEmitMethodWrapper>b__0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Components.UmbracoFormsComponent], [Parameter: workflowServices(Umbraco.Forms.Core.Services.IWorkflowServices)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowServices, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Unresolved dependency [Target Type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember], [Parameter: recordService(Umbraco.Forms.Core.Services.IRecordService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IRecordService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)

    -> System.InvalidOperationException: Unresolved dependency [Target Type: Umbraco.Forms.Core.Services.RecordService], [Parameter: workflowService(Umbraco.Forms.Core.Services.IWorkflowService)], [Requested dependency: ServiceType:Umbraco.Forms.Core.Services.IWorkflowService, ServiceName:] at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency) at LightInject.ServiceContainer.EmitConstructorDependencies(ConstructionInfo constructionInfo, IEmitter emitter, Action1 decoratorTargetEmitter) at LightInject.ServiceContainer.EmitNewInstanceUsingImplementingType(IEmitter emitter, ConstructionInfo constructionInfo, Action1 decoratorTargetEmitMethod) at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.2(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action1 serviceEmitter) at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.1(IEmitter methodSkeleton) at LightInject.ServiceContainer.<>cDisplayClass153_0.0(IEmitter ms) at LightInject.ServiceContainer.EmitConstructorDependency(IEmitter emitter, Dependency dependency)

    -> System.InvalidOperationException: Unable to resolve type: MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, service name: at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) at LightInject.ServiceContainer.GetInstance(Type serviceType) at Umbraco.Core.Composing.LightInject.LightInjectContainer.GetInstance(Type type) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItem(IFactory factory, Type itemType) at Umbraco.Core.Composing.CollectionBuilderBase3.<>cDisplayClass100.0(Type x) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateItems(IFactory factory) at Umbraco.Core.Composing.CollectionBuilderBase3.CreateCollection(IFactory factory) at Umbraco.Core.Composing.LightInject.LightInjectContainer.<>cDisplayClass2001.<Register>b__0(IServiceFactory f) at DynamicMethod(Object[] ) at LightInject.ServiceContainer.<>c__DisplayClass150_0.<WrapAsFuncDelegate>b__0() at LightInject.ServiceContainer.<>c__DisplayClass198_0.<EmitLifetime>b__1() at LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) at LightInject.ServiceContainer.<>cDisplayClass1970.0.

    -> System.InvalidOperationException: Recursive dependency detected: ServiceType:MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, ServiceName:] at LightInject.ServiceContainer.<>cDisplayClass1530.0(IEmitter ms) at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError)] Umbraco.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException) +632 Umbraco.Web.<>c.

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

  • Chris Scarry 22 posts 92 karma points
    Aug 17, 2023 @ 13:35
    Chris Scarry
    0

    Anyone got any suggestions as I still haven't been able to solve this issue.

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Aug 18, 2023 @ 09:45
    Marc Goodson
    0

    Hi Chris

    There is some useful info on registering dependencies with the LightInject container here:

    https://our.umbraco.com/Documentation/Reference/Using-Ioc/

    So if you use an interface in a constructor for your custom class, then that class needs to be registered with LightInject along with the concrete implementation of the interface.

    When Umbraco boots up it uses 'Type Scanning' to automatically register certain types of classes eg RenderControllers, SurfaceControllers so your custom stuff is 'good to go' with injecting dependencies...

    So I think what is happening is that Umbraco is finding your custom Workflow Types, via the scanning and then is somehow unable to resolve the IRecordService instance...

    ... which I presume is from Umbraco Forms? and I'd expect that to also be auto registered?

    but if it is your own interface (and perhaps also for Umbraco Forms) you'd need to register the implementation of that interface with LightInject

    eg

    composition.Register<IRecordService, RecordService>();
    

    That would tell LightInject that whenever IRecordService is a parameter in a constructor for a class 'substitute' this RecordService implementation...

    but what you have posted seem to be saying whenever IRecordService is used, use SaveAsUmbracoMember instead (you have multiple registrations for the same interface - it can only be one, so your last register knocks out the previous one!)

    So that doesn't seem quite right.

    Also found this issue here:

    https://github.com/umbraco/Umbraco.Forms.Issues/issues/410

    Sorry if it's a bit vague, but hopefully this gives you a steer on where the DI might not be quite right, maybe if I can see the whole of your WorkflowType class, I might be able to discern further where it is going awry.

    regards

    Marc

  • Chris Scarry 22 posts 92 karma points
    Aug 21, 2023 @ 20:10
    Chris Scarry
    0

    Hey Marc,

    Thank you for the insight, it is very much appreciated. I have two workflows that are giving that same error.

    using MyProject.Models;
    

    using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Web; using Umbraco.Core.Logging; using Umbraco.Forms.Core; using Umbraco.Forms.Core.Attributes; using Umbraco.Forms.Core.Enums; using Umbraco.Forms.Data.Storage; using Security.Membership; using System.Threading.Tasks; using AuthorizeNet.Util; using System.Web.UI.WebControls; using Umbraco.Forms.Core.Data.Storage; using Umbraco.Forms.Core.Models; using Umbraco.Forms.Core.Persistence.Dtos; using Umbraco.Forms.Core.Services; using Umbraco.Core.Composing;

    namespace MyProject.Providers.WorkflowTypes { public class SaveAsUmbracoBusinessMember : WorkflowType { private IRecordService _recordService; private IRecordStorage _recordStorage;

        [Umbraco.Forms.Core.Attributes.Setting("Mappings", PreValues = "", Description = "Map form fields to Customer Account", View = "customer-accountmapper")]
        public string MappingsField { get; set; }
    
        public SaveAsUmbracoBusinessMember(IRecordService recordService, IRecordStorage recordStorage)
        {
            this.Id = new Guid("6D55EC46-3E01-43F1-814D-69060C99CC0F");
            this.Name = "Save as Business Customer";
            this.Description = "Saves the form values as an Umbraco member / customer";
            _recordService = recordService;
            _recordStorage = recordStorage;
        }
    
        [Umbraco.Forms.Core.Attributes.Setting("Member Type", Description = "Map member type", View = "TextField")]
        public string MemberType { get; set; }
    
        public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e)
        {
            try
            {
                // get the correct values from the form
                var companyName = GetFormValue(record, "Company Name");
                var companyType = GetFormValue(record, "Company Type");
                var distributor = GetFormValue(record, "Distributor");
                var firstName = GetFormValue(record, "First Name");
                var lastName = GetFormValue(record, "Last Name");
                var email = GetFormValue(record, "Email Address");
                var streetAddress = GetFormValue(record, "Street Address");
                var city = GetFormValue(record, "City");
                var state = GetFormValue(record, "State");
                var province = GetFormValue(record, "Province");
                var postalCode = GetFormValue(record, "Postal Code");
                var country = GetFormValue(record, "Country");
                var password = GetFormValue(record, "Password");
                bool termsAgree = !String.IsNullOrEmpty(GetFormValue(record, "Terms Agreement")) ? true : false;
    
                // check we have data for all required fields
                if (string.IsNullOrEmpty(firstName) || string.IsNullOrEmpty(lastName)
                    || string.IsNullOrEmpty(email) || string.IsNullOrEmpty(password) || termsAgree == false)
                {
                    Current.Logger.Warn(this.GetType(), string.Format("Unable to Create Account: Missing required information"));
                    return WorkflowExecutionStatus.Failed;
                }
    
                try
                {
                    MemberAccount.CreateBusinessAccount(companyName, companyType, distributor, firstName,
                        lastName, email, streetAddress, country, password, termsAgree, city, state, province, postalCode);
    
                    foreach (RecordField rf in record.RecordFields.Values)
                    {
                        if (rf.Field.Alias == "status")
                        {
                            rf.Values.Clear();
                            rf.Values.Add("Some Sort of Status");
                        }
                    }
                }
                catch (Exception ex)
                {
                    Current.Logger.Warn(this.GetType(), string.Format("Unable to Create Account: {0}", ex.Message), ex);
    
                    foreach (RecordField rf in record.RecordFields.Values)
                    {
                        if (rf.Field.Alias == "status")
                        {
                            rf.Values.Clear();
                            rf.Values.Add(ex.Message);
                        }
                    }
    
                    // If we altered a field, we can save it using the record storage
                    UpdateRecord(record, e.Form);
    
                    return WorkflowExecutionStatus.Failed;
                }
    
                // If we altered a field, we can save it using the record storage
                UpdateRecord(record, e.Form);
    
                return WorkflowExecutionStatus.Completed;
            }
            catch (Exception ex)
            {
                Current.Logger.Warn(this.GetType(), string.Format("Unable to Create Account: {0}", ex.Message), ex);
    
                foreach (RecordField rf in record.RecordFields.Values)
                {
                    if (rf.Field.Alias == "status")
                    {
                        rf.Values.Clear();
                        rf.Values.Add(ex.Message);
                    }
                }
    
                // If we altered a field, we can save it using the record storage
                UpdateRecord(record, e.Form);
    
                return WorkflowExecutionStatus.Failed;
            }
        }
    
        public override List<Exception> ValidateSettings()
        {
            List<Exception> exceptions = new List<Exception>();
    
            if (MemberType != "Customer")
                exceptions.Add(new Exception("Currently only support Customer Member type"));
            return exceptions;
        }
    
        public string GetFormValue(Record record, string alias)
        {
            // parse the mappings JSON string
            var settings = JArray.Parse(MappingsField) as IEnumerable<dynamic>;
    
            // get the field guid for the given alias
            var fieldGuid = (Guid)settings.FirstOrDefault(x => x.alias.ToString().ToLower() == alias.ToLower()).value;
    
            // get and return the corresponding value from the record
            return fieldGuid == null ? "" : record.GetRecordField(fieldGuid).ValuesAsString();
        }
    
        public void UpdateRecord(Record record, Form form)
        {
                // Update the record with the current data.
                record.RecordData = record.GenerateRecordDataAsJson();
    
                // Update the record and get the (new?/updated) record back
                // https://issues.umbraco.org/issue/CON-1482
                record.RecordData = record.GenerateRecordDataAsJson();
                if (record.Id > 0)
                {
                    record = _recordStorage.UpdateRecord(record, form);
                }
                else
                {
                    record = _recordStorage.InsertRecord(record, form);
                }
    
            Task task = new Task(() =>
            {
                // Approve the form.
                _recordService.Approve(record, form);
            });
    
            task.Start();
        }
    }
    

    }

    then there is this file:

    using MyProject.Models;
    

    using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Web; using Umbraco.Core.Logging; using Umbraco.Forms.Core; using Umbraco.Forms.Core.Attributes; using Umbraco.Forms.Core.Enums; using Umbraco.Forms.Data.Storage; using Umbraco.Forms.Web; using Security.Membership; using System.Threading.Tasks; using Umbraco.Forms.Core.Persistence.Dtos; using Umbraco.Forms.Core.Data.Storage; using Umbraco.Forms.Core.Services; using Umbraco.Core.Composing; using Umbraco.Forms.Core.Models;

    namespace MyProject.Providers.WorkflowTypes { public class SaveAsUmbracoMember : WorkflowType {

        [Umbraco.Forms.Core.Attributes.Setting("Mappings", PreValues = "", Description = "Map form fields to Customer Account", View = "customer-accountmapper")]
        public string MappingsField { get; set; }
    
        private IRecordStorage _recordStorage { get; set; }
    
        private IRecordService _recordService { get; set; }
    
        public SaveAsUmbracoMember(IRecordService recordService, IRecordStorage recordStorage)
        {
            _recordService = recordService;
            _recordStorage = recordStorage;
            this.Id = new Guid("FF0D8695-3030-4DA3-BE08-11A464484CBC");
            this.Name = "Save as Customer";
            this.Description = "Saves the form values as an Umbraco member / customer";
        }
    
        [Umbraco.Forms.Core.Attributes.Setting("Member Type", Description = "Map member type", View = "TextField")]
        public string MemberType { get; set; }
    
        public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e)
        {
            try
            {
                // get the correct values from the form
                var firstName = GetFormValue(record, "First Name");
                var lastName = GetFormValue(record, "Last Name");
                var email = GetFormValue(record, "Email Address");
                var streetAddress = GetFormValue(record, "Street Address");
                var city = GetFormValue(record, "City");
                var state = GetFormValue(record, "State");
                var province = GetFormValue(record, "Province");
                var postalCode = GetFormValue(record, "Postal Code");
                var country = GetFormValue(record, "Country");
                var password = GetFormValue(record, "Password");
                bool termsAgree = !String.IsNullOrEmpty(GetFormValue(record, "Terms Agreement")) ? true : false;
    
                // check we have data for all required fields
                if (string.IsNullOrEmpty(firstName) || string.IsNullOrEmpty(lastName) 
                    || string.IsNullOrEmpty(email) || string.IsNullOrEmpty(password) || termsAgree == false)
                {
                    Current.Logger.Warn(this.GetType(), string.Format("Unable to Create Account: Missing required information"));
                    return WorkflowExecutionStatus.Failed;
                }
    
                try
                {
                    MemberAccount.CreateCustomerAccount(firstName, lastName, email, streetAddress, country, password, termsAgree, city, state, province, postalCode);
    
                    foreach (RecordField rf in record.RecordFields.Values)
                    {
                        if(rf.Field.Alias == "status")
                        {
                            rf.Values.Clear();
                            rf.Values.Add("Some Sort of Status");
                        }
                    }
                }
                catch (Exception ex)
                {
                    Current.Logger.Warn(this.GetType(), string.Format("Unable to Create Account: {0}", ex.Message), ex);
    
                    foreach (RecordField rf in record.RecordFields.Values)
                    {
                        if (rf.Field.Alias == "status")
                        {
                            rf.Values.Clear();
                            rf.Values.Add(ex.Message);
                        }
                    }
    
                    // If we altered a field, we can save it using the record storage
                    UpdateRecord(record, e.Form);
    
                    return WorkflowExecutionStatus.Failed;
                }
    
                // If we altered a field, we can save it using the record storage
                UpdateRecord(record, e.Form);
    
                return WorkflowExecutionStatus.Completed;
            }
            catch (Exception ex)
            {
                Current.Logger.Warn(this.GetType(), string.Format("Unable to Create Account: {0}", ex.Message), ex);
    
                foreach (RecordField rf in record.RecordFields.Values)
                {
                    if (rf.Field.Alias == "status")
                    {
                        rf.Values.Clear();
                        rf.Values.Add(ex.Message);
                    }
                }
    
                // If we altered a field, we can save it using the record storage
                UpdateRecord(record, e.Form);
    
                return WorkflowExecutionStatus.Failed;
            }
        }
    
        public override List<Exception> ValidateSettings()
        {
            List<Exception> exceptions = new List<Exception>();
    
            if (MemberType != "Customer")
                exceptions.Add(new Exception("Currently only support Customer Member type"));
            return exceptions;
        }
    
        public string GetFormValue(Record record, string alias)
        {
            // parse the mappings JSON string
            var settings = JArray.Parse(MappingsField) as IEnumerable<dynamic>;
    
            // get the field guid for the given alias
            var fieldGuid = (Guid)settings.FirstOrDefault(x => x.alias.ToString().ToLower() == alias.ToLower()).value;
    
            // get and return the corresponding value from the record
            return fieldGuid == null ? "" : record.GetRecordField(fieldGuid).ValuesAsString();
        }
    
        public void UpdateRecord(Record record, Form form)
        {       
            // Update the record with the current data.
                record.RecordData = record.GenerateRecordDataAsJson();
    
                // Update the record and get the (new?/updated) record back
                // https://issues.umbraco.org/issue/CON-1482
                record.RecordData = record.GenerateRecordDataAsJson();
                if (record.Id > 0)
                {
                    record = _recordStorage.UpdateRecord(record, form);
                }
                else
                {
                    record = _recordStorage.InsertRecord(record, form);
                }
    
            Task task = new Task(() =>
            {
                // Approve the form.
                _recordService.Approve(record, form);
            });
    
            task.Start();
        }
    }
    

    }

  • Johan Reitsma 68 posts 234 karma points MVP
    Aug 22, 2023 @ 08:57
    Johan Reitsma
    0

    Do you still need help?

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Aug 22, 2023 @ 09:07
    Marc Goodson
    0

    Hi Chris

    Ahh, it looks like these workflows have been taken from this example:

    https://github.com/umbraco/Umbraco.Forms.Issues/issues/186#issuecomment-511328665

    I misunderstood, So the IRecordService is actually part of Umbraco Forms and should be automatically registered with DI.

    In terms of the custom WorkflowTypes, then in V8 it looks like all instances that inherit from WorkflowType are type scanned (In V9+ you have to register your custom Workflow Types explicitly in the Workflow Type collection).

    https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/Extending/Adding-a-Type#registering-the-class-with-umbraco-and-forms

    So you don't need the code you had in the WorkflowComposer (that would just remove UmbracoForms implementation of IRecordService!)

    The key error seems to regarding a Recursive Dependency:

     System.InvalidOperationException: Recursive dependency detected: ServiceType:MyProject.Providers.WorkflowTypes.SaveAsUmbracoBusinessMember, ServiceName:]
    

    but I can't see from your code anything that would specifically cause this?

    The only thing I'm not sure about from your sample is:

     MemberAccount.CreateCustomerAccount(firstName, lastName, email, streetAddress, country, password, termsAgree, city, state, province, postalCode);
    

    and

    MemberAccount.CreateBusinessAccount(companyName, companyType, distributor, firstName,
                    lastName, email, streetAddress, country, password, termsAgree, city, state, province, postalCode);
    

    I'm not sure where MemberAccount is coming from, if it is static or has dependencies? (I'd probably comment out these two lines first to see if it boots, and the explore further the implementation of them, if, without them, all is fine.

    There is a further trick when you get Circular References, and that is to inject your services as 'Lazy' in which case they will only get instantiated when they are used and not when they are constructed in DI, therefore breaking the circle eg

    private Lazy<IRecordService> _recordService; 
    private Lazy<IRecordStorage> _recordStorage;
    
      public SaveAsUmbracoBusinessMember(Lazy<IRecordService> recordService, Lazy<IRecordStorage> recordStorage)
        {
            this.Id = new Guid("6D55EC46-3E01-43F1-814D-69060C99CC0F");
            this.Name = "Save as Business Customer";
            this.Description = "Saves the form values as an Umbraco member / customer";
            _recordService = recordService;
            _recordStorage = recordStorage;
        }
    

    At least trying this Lazy approach would rule out IRecordService / IRecordStorage as being the cause of the circularity!

    regareds

    marc

  • Chris Scarry 22 posts 92 karma points
    Aug 22, 2023 @ 14:15
    Chris Scarry
    0

    Hey Marc,

    Thanks for the reply and good detail. The MemberAccount is coming from another project within my solution. Here is the code for that:

    using System;
    

    using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Umbraco.Core; using Umbraco.Core.Models;

    namespace Security.Membership { public class MemberAccount { public static IMember CreateCustomerAccount(string firstName, string lastName, string email, string streetAddress1, string country, string password, bool termsAgree, string city = "", string state = "", string province = "", string postalCode = "") { var memberService = ApplicationContext.Current.Services.MemberService;

            var newMember = memberService.CreateMember(email, email, String.Format("{0} {1}", firstName, lastName), "customer");
            newMember.IsApproved = true;
    
            memberService.Save(newMember);
    
            memberService.SavePassword(newMember, password);
    
    
            newMember.SetValue("firstName", firstName);
            newMember.SetValue("lastName", lastName);
            newMember.SetValue("termsAgreement", termsAgree);
            newMember.SetValue("shippingAddress1", streetAddress1);
            newMember.SetValue("shippingCity", city);
    
            if (!string.IsNullOrEmpty(state))
            {
                newMember.SetValue("shippingState", state);
            } else if (!string.IsNullOrEmpty(province))
            {
                newMember.SetValue("shippingState", province);
            }
    
            newMember.SetValue("shippingCountry", country);
            newMember.SetValue("shippingPostalCode", postalCode);
    
            memberService.Save(newMember);
            memberService.AssignRole(newMember.Id, "Public");
    
            return newMember;
        }
    
        public static IMember CreateBusinessAccount(string companyName, string companyType, string distributor, 
           string firstName, string lastName,
           string email, string streetAddress1, string country, string password, bool termsAgree, string city = "",
           string state = "", string province = "", string postalCode = "")
        {
            var memberService = ApplicationContext.Current.Services.MemberService;
    
            var newMember = memberService.CreateMember(email, email, String.Format("{0} {1}", firstName, lastName), "customer");
            newMember.IsApproved = false;
    
            memberService.Save(newMember);
    
            memberService.SavePassword(newMember, password);
    
    
            newMember.SetValue("firstName", firstName);
            newMember.SetValue("lastName", lastName);
            newMember.SetValue("termsAgreement", termsAgree);
            newMember.SetValue("shippingAddress1", streetAddress1);
            newMember.SetValue("shippingCity", city);
    
            if (!string.IsNullOrEmpty(state))
            {
                newMember.SetValue("shippingState", state);
            }
            else if (!string.IsNullOrEmpty(province))
            {
                newMember.SetValue("shippingState", province);
            }
    
            newMember.SetValue("shippingCountry", country);
            newMember.SetValue("shippingPostalCode", postalCode);
    
            memberService.Save(newMember);
            memberService.AssignRole(newMember.Id, "Public");
    
            return newMember;
        }
    }
    

    }

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Aug 22, 2023 @ 14:32
    Marc Goodson
    0

    Hi Chris

    if you comment out those two lines as David suggests does it boot?

    This line within your static class

    var memberService = ApplicationContext.Current.Services.MemberService;

    won't work in V8!

    The recommendation would be to write your MemberAccount code as a service instead of a static class, you could then register this with DI, and inject it into your WorkflowType.

    or a frowned upon way of doing it would be to add

    using Current = Umbraco.Web.Composing.Current;

    to the top of your file and have

    var memberService = Current.Factory.GetInstance<IMemberService>();
    

    but the proper DI way of doing it would be to have

    public class MemberAccount {
    private readonly IMemberService _memberService;
    
    public MemberAccount(IMemberService memberService){
    _memberService = memberService;
    }
    
    }
    

    and then register inside a composer

     composition.Register<MemberAccount>(Lifetime.Singleton);
    

    Your workflow constructor would then have

     public SaveAsUmbracoBusinessMember(IRecordService recordService, IRecordStorage recordStorage, MemberAccount memberAccount)
    

    but be interesting to know if it's these two static methods causing the boot issue.

    regards

    marc

  • Chris Scarry 22 posts 92 karma points
    Aug 22, 2023 @ 15:10
    Chris Scarry
    0

    Hey Marc,

    Thank you for this explanation. I have some new issues after updating some nuget package SDKs causing me build errors now. I am working on getting those fixed and then will work on correcting these workflows. Thanks again for all of the insight!

  • David Zweben 268 posts 754 karma points
    Aug 22, 2023 @ 12:14
    David Zweben
    1

    If you're still having the issue, I'm going to suggest a general troubleshooting approach that I think will help. Get to a working state as your first step. Do whatever you have to do to get the site booting again, even if that means disabling all of your custom code. Try not to disable way more than you have to, but most importantly just get the site starting up. Then, bit by bit, re-enable your code. You should be able to narrow down what is breaking it. If you've already narrowed it down to a specific class or method, comment out pieces of that class or method until it works, then re-enable a bit at a time.

    It's one of the fastest ways to narrow things down if you're stuck. No guesswork.

  • Chris Scarry 22 posts 92 karma points
    Aug 22, 2023 @ 14:17
    Chris Scarry
    0

    Hey David,

    Thanks for the reply and valuable tips! I am able to get it to boot once excluding the two above files in my project so I got it narrowed down to those specific files being the issues. I like the tip about commenting out specific pieces of the problem files, thats something I never even thought about!

Please Sign in or register to post replies

Write your reply to:

Draft