Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Castle.MicroKernel.Lifestyle.WebRequestScopeAccessor #57

Open
tasoss opened this issue Mar 8, 2019 · 7 comments
Open

Castle.MicroKernel.Lifestyle.WebRequestScopeAccessor #57

tasoss opened this issue Mar 8, 2019 · 7 comments

Comments

@tasoss
Copy link

tasoss commented Mar 8, 2019

Hello.
I have just updated a solution with a few projects.
And i get the following error.

at Nancy.Bootstrappers.Windsor.NancyPerWebRequestScopeAccessor..ctor()
at lambda_method(Closure , Object[] )
at Castle.Core.Internal.ReflectionUtil.Instantiate(ConstructorInfo ctor, Object[] ctorArgs)
at Castle.Core.Internal.ReflectionUtil.Instantiate[TBase](Type subtypeofTBase, Object[] ctorArgs)
at Castle.Core.Internal.ReflectionUtil.CreateInstance[TBase](Type subtypeofTBase, Object[] ctorArgs)
at Castle.MicroKernel.DefaultKernel.CreateScopeAccessor(ComponentModel model)
at Castle.MicroKernel.DefaultKernel.CreateLifestyleManager(ComponentModel model, IComponentActivator activator)
at Castle.MicroKernel.Handlers.DefaultHandler.InitDependencies()
at Castle.MicroKernel.Handlers.AbstractHandler.Init(IKernelInternal kernel)
at Castle.MicroKernel.Handlers.DefaultHandlerFactory.Create(ComponentModel model)
at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.CreateHandler(ComponentModel model)
at Castle.MicroKernel.DefaultKernel.AddCustomComponent(ComponentModel model)
at Castle.MicroKernel.Registration.ComponentRegistration1.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel) at Castle.MicroKernel.DefaultKernel.Register(IRegistration[] registrations) at Castle.Windsor.WindsorContainer.Register(IRegistration[] registrations) at Nancy.Bootstrappers.Windsor.WindsorNancyBootstrapper.RegisterModules(IWindsorContainer container, IEnumerable1 moduleRegistrationTypes)
at Nancy.Bootstrapper.NancyBootstrapperBase`1.Initialise()
at Nancy.Owin.NancyMiddleware.UseNancy(NancyOptions options)
at Owin.AppBuilderExtensions.UseNancy(IAppBuilder builder, NancyOptions options)
at DatabaseRest.Startup.Configuration(IAppBuilder app) in C:\foobar\Startup.cs:line 83

Could not load type 'Castle.MicroKernel.Lifestyle.WebRequestScopeAccessor' from assembly 'Castle.Windsor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'.

I'm using castle.windsor v5 and Nancy.Bootstrappers.Windsor 1.4.1 (i have tried v2 too)
Am i doing something wrong?
Thanks!

@robsonj
Copy link

robsonj commented Mar 19, 2019

We see the same issue, we had to move back to Castle.Windsor 4.1.1

@waynebx
Copy link

waynebx commented Apr 5, 2019

I had the same issue. Turned out it was a third party library that I was using that caused this (in my case it was the deprecated Castle.Windsor.Lifestyles because I wanted to use the Hybrid lifestyles). If that's also your case, you can fork the library, correct the dependencies and use the forked one in your code.

@robsonj
Copy link

robsonj commented May 6, 2019

Added Pull #58 to address this. May need some assistance to get it working with Cake. But would really like to get a new v2.0.0 of this package out there if possible please.

#58

@tasoss
Copy link
Author

tasoss commented Jul 5, 2019

Hello again.
I have tried to use the 2.0.0 version of nancy(during the process of updating nuget packages) and i get the same error.
Is it supposed to have been fixed?
Sorry i'm just confused.

@tasoss
Copy link
Author

tasoss commented Jul 6, 2019

Finally i have used your repo and everything is fine.
But why isn't it yet merged ?
Thanks!

@robsonj
Copy link

robsonj commented Jul 6, 2019

I gave up trying to get help to merge it. In the end I pulled the few classes into our repo with a plan to migrate away from NancyFx

@tasoss
Copy link
Author

tasoss commented Jul 6, 2019

I agree!
Thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants