You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.
I've run into an issue that appears to be new with Autofac 4. When Nancy calls GetAllModules at startup to register each module's routes, it fails in the getter of NancyModule.Request as the Context in that instance is null.
Given that I'm registering my modules like this with properties autowired, it could be that a change to property wiring in Autofac has broken this registration. Not sure!
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Something went wrong when trying to satisfy one of the dependencies during composition, make sure that you've registered all new dependencies in the container and inspect the innerexception for more details. --->
Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = NancyEngine (ReflectionActivator), Services = [Nancy.INancyEngine], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope --->
An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = DefaultRequestDispatcher (ReflectionActivator), Services = [Nancy.Routing.IRequestDispatcher], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope --->
An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = DefaultRouteResolver (ReflectionActivator), Services = [Nancy.Routing.IRouteResolver], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope --->
An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = RouteCache (ReflectionActivator), Services = [Nancy.Routing.IRouteCache], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope --->
An exception was thrown while invoking the constructor 'Void .ctor(Nancy.INancyModuleCatalog, Nancy.INancyContextFactory, Nancy.Routing.IRouteSegmentExtractor, Nancy.Routing.IRouteDescriptionProvider, Nancy.Culture.ICultureService, System.Collections.Generic.IEnumerable`1[Nancy.Routing.IRouteMetadataProvider])' on type 'RouteCache'. --->
An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = INancyModule[] (DelegateActivator), Services = [System.Collections.Generic.IEnumerable`1[[Nancy.INancyModule, Nancy, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null]]], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = ExternallyOwned --->
An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = INancyModule[] (DelegateActivator), Services = [System.Collections.Generic.IEnumerable`1[[Nancy.INancyModule, Nancy, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null]]], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = ExternallyOwned --->
and so on and so on...
I've downgraded to Autofac 3.x for now as a workaround.
Thanks!
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I've run into an issue that appears to be new with Autofac 4. When Nancy calls
GetAllModules
at startup to register each module's routes, it fails in the getter ofNancyModule.Request
as the Context in that instance is null.Given that I'm registering my modules like this with properties autowired, it could be that a change to property wiring in Autofac has broken this registration. Not sure!
Stack Trace:
and so on and so on...
I've downgraded to Autofac 3.x for now as a workaround.
Thanks!
The text was updated successfully, but these errors were encountered: