Relative Content

Tag Archive for autofac

Instances cannot be resolved error gives no trace

I’m getting the error System.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.

Instances cannot be resolved error gives no trace

I’m getting the error System.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.

Autofac DI and “Child” Scopes

I have a project where I use Autofac to create UI components.
I would like some of my Autofac-created UI components to have child components that can potentially reference their parent.

Attempt by security transparent method Autofac.Integration.Mvc.RegistrationExtensions

Attempt by security transparent method ‘Autofac.Integration.Mvc.RegistrationExtensions.RegisterControllers(Autofac.ContainerBuilder, System.Reflection.Assembly[])’ to access security critical type ‘Autofac.Builder.IRegistrationBuilder`3<System.Object,Autofac.Features.Scanning.ScanningActivatorData,Autofac.Builder.DynamicRegistrationStyle>’ failed.