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.
The call to UseNancy() throws the following error. Ninject is not able to resolve IRouteResolverTrie.
System.InvalidOperationException was unhandled
HResult=-2146233079
Message=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.
Source=Nancy
StackTrace:
at Nancy.Bootstrapper.NancyBootstrapperBase1.SafeGetNancyEngineInstance() at Nancy.Bootstrapper.NancyBootstrapperBase1.GetEngine()
at Nancy.Owin.NancyMiddleware.UseNancy(NancyOptions options)
at Owin.AppBuilderExtensions.UseNancy(IAppBuilder builder, NancyOptions options)
at MyHost.
b__b(IAppBuilder builder) in c:\dev\MyHost\Program.cs:line 194
at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveApp(StartContext context)
at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)
at Microsoft.Owin.Hosting.WebApp.StartImplementation(IServiceProvider services, StartOptions options, Action1 startup) at Microsoft.Owin.Hosting.WebApp.Start(StartOptions options, Action1 startup)
at MyHost.Main() in c:\dev\MyHost\Program.cs:line 177
at MyHost.Main(String[] args) in c:\dev\MyHost\Program.cs:line 248
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: Ninject.ActivationException
HResult=-2146233088
Message=Error activating IRouteResolverTrie
No matching bindings are available, and the type is not self-bindable.
Activation path:
4) Injection of dependency IRouteResolverTrie into parameter trie of constructor of type DefaultRouteResolver
3) Injection of dependency IRouteResolver into parameter routeResolver of constructor of type DefaultRequestDispatcher
2) Injection of dependency IRequestDispatcher into parameter dispatcher of constructor of type NancyEngine
Request for INancyEngine
Suggestions:
Ensure that you have defined a binding for IRouteResolverTrie.
If the binding was defined in a module, ensure that the module has been loaded into the kernel.
Ensure you have not accidentally created more than one kernel.
If you are using constructor arguments, ensure that the parameter name matches the constructors parameter name.
If you are using automatic module loading, ensure the search path and filters are correct.
Source=Ninject
StackTrace:
at Ninject.KernelBase.Resolve(IRequest request)
at Ninject.Planning.Targets.Target`1.GetValue(Type service, IContext parent)
at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent)
at Ninject.Activation.Providers.StandardProvider.GetValue(IContext context, ITarget target)
at Ninject.Activation.Providers.StandardProvider.<>c__DisplayClass4.<Create>b__2(ITarget target)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Ninject.Activation.Providers.StandardProvider.Create(IContext context)
at Ninject.Activation.Context.ResolveInternal(Object scope)
at Ninject.Activation.Context.Resolve()
at Ninject.KernelBase.<>c__DisplayClass15.<Resolve>b__f(IBinding binding)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at Ninject.Planning.Targets.Target`1.GetValue(Type service, IContext parent)
at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent)
at Ninject.Activation.Providers.StandardProvider.GetValue(IContext context, ITarget target)
at Ninject.Activation.Providers.StandardProvider.<>c__DisplayClass4.<Create>b__2(ITarget target)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Ninject.Activation.Providers.StandardProvider.Create(IContext context)
at Ninject.Activation.Context.ResolveInternal(Object scope)
at Ninject.Activation.Context.Resolve()
at Ninject.KernelBase.<>c__DisplayClass15.<Resolve>b__f(IBinding binding)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at Ninject.Planning.Targets.Target`1.GetValue(Type service, IContext parent)
at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent)
at Ninject.Activation.Providers.StandardProvider.GetValue(IContext context, ITarget target)
at Ninject.Activation.Providers.StandardProvider.<>c__DisplayClass4.<Create>b__2(ITarget target)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Ninject.Activation.Providers.StandardProvider.Create(IContext context)
at Ninject.Activation.Context.ResolveInternal(Object scope)
at Ninject.Activation.Context.Resolve()
at Ninject.KernelBase.<>c__DisplayClass15.<Resolve>b__f(IBinding binding)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at Ninject.ResolutionExtensions.Get[T](IResolutionRoot root, IParameter[] parameters)
at Nancy.Bootstrappers.Ninject.NinjectNancyBootstrapper.GetEngineInternal()
at Nancy.Bootstrapper.NancyBootstrapperBase`1.SafeGetNancyEngineInstance()
InnerException:
The text was updated successfully, but these errors were encountered:
I am trying to use Nancy in a console hosted Owin app.
My Bootstrapper and the main startup of Nancy are defined as follows:
//NOTE: kernel is a static variable and is the ninject StandardKernel
The call to UseNancy() throws the following error. Ninject is not able to resolve IRouteResolverTrie.
System.InvalidOperationException was unhandled
b__b(IAppBuilder builder) in c:\dev\MyHost\Program.cs:line 194HResult=-2146233079
Message=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.
Source=Nancy
StackTrace:
at Nancy.Bootstrapper.NancyBootstrapperBase
1.SafeGetNancyEngineInstance() at Nancy.Bootstrapper.NancyBootstrapperBase
1.GetEngine()at Nancy.Owin.NancyMiddleware.UseNancy(NancyOptions options)
at Owin.AppBuilderExtensions.UseNancy(IAppBuilder builder, NancyOptions options)
at MyHost.
at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveApp(StartContext context)
at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)
at Microsoft.Owin.Hosting.WebApp.StartImplementation(IServiceProvider services, StartOptions options, Action
1 startup) at Microsoft.Owin.Hosting.WebApp.Start(StartOptions options, Action
1 startup)at MyHost.Main() in c:\dev\MyHost\Program.cs:line 177
at MyHost.Main(String[] args) in c:\dev\MyHost\Program.cs:line 248
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: Ninject.ActivationException
HResult=-2146233088
Message=Error activating IRouteResolverTrie
No matching bindings are available, and the type is not self-bindable.
Activation path:
4) Injection of dependency IRouteResolverTrie into parameter trie of constructor of type DefaultRouteResolver
3) Injection of dependency IRouteResolver into parameter routeResolver of constructor of type DefaultRequestDispatcher
2) Injection of dependency IRequestDispatcher into parameter dispatcher of constructor of type NancyEngine
Suggestions:
The text was updated successfully, but these errors were encountered: