Advertisement
Guest User

Ninject error

a guest
Jan 30th, 2015
406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.82 KB | None | 0 0
  1. Ninject.ActivationException: Error activating ModelValidatorProvider using binding from ModelValidatorProvider to NinjectDefaultModelValidatorProvider
  2. A cyclical dependency was detected between the constructors of two services.
  3.  
  4. Activation path:
  5. 3) Injection of dependency ModelValidatorProvider into parameter defaultModelValidatorProviders of constructor of type DefaultModelValidatorProviders
  6. 2) Injection of dependency DefaultModelValidatorProviders into parameter defaultModelValidatorProviders of constructor of type NinjectDefaultModelValidatorProvider
  7. 1) Request for ModelValidatorProvider
  8.  
  9. Suggestions:
  10. 1) Ensure that you have not declared a dependency for ModelValidatorProvider on any implementations of the service.
  11. 2) Consider combining the services into a single one to remove the cycle.
  12. 3) Use property injection instead of constructor injection, and implement IInitializable
  13. if you need initialization logic to be run after property values have been injected.
  14.  
  15. STACK:
  16.  
  17. [ActivationException: Error activating ModelValidatorProvider using binding from ModelValidatorProvider to NinjectDefaultModelValidatorProvider
  18. A cyclical dependency was detected between the constructors of two services.
  19.  
  20. Activation path:
  21. 3) Injection of dependency ModelValidatorProvider into parameter defaultModelValidatorProviders of constructor of type DefaultModelValidatorProviders
  22. 2) Injection of dependency DefaultModelValidatorProviders into parameter defaultModelValidatorProviders of constructor of type NinjectDefaultModelValidatorProvider
  23. 1) Request for ModelValidatorProvider
  24.  
  25. Suggestions:
  26. 1) Ensure that you have not declared a dependency for ModelValidatorProvider on any implementations of the service.
  27. 2) Consider combining the services into a single one to remove the cycle.
  28. 3) Use property injection instead of constructor injection, and implement IInitializable
  29. if you need initialization logic to be run after property values have been injected.
  30. ]
  31. Ninject.Activation.Context.Resolve() +158
  32. Ninject.<>c__DisplayClass15.<Resolve>b__f(IBinding binding) +86
  33. System.Linq.WhereSelectListIterator`2.MoveNext() +108
  34. System.Linq.<CastIterator>d__b1`1.MoveNext() +85
  35. System.Linq.WhereEnumerableIterator`1.MoveNext() +85
  36. System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +381
  37. System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
  38. Ninject.Web.WebApi.Validation.NinjectDefaultModelValidatorProvider..ctor(IKernel kernel, DefaultModelValidatorProviders defaultModelValidatorProviders) +201
  39. DynamicInjectorad40730ed1ff4b5d8bb0f7af4a89da73(Object[] ) +171
  40. Ninject.Activation.Providers.StandardProvider.Create(IContext context) +884
  41. Ninject.Activation.Context.ResolveInternal(Object scope) +218
  42. Ninject.Activation.Context.Resolve() +277
  43. Ninject.<>c__DisplayClass15.<Resolve>b__f(IBinding binding) +86
  44. System.Linq.WhereSelectListIterator`2.MoveNext() +108
  45. System.Linq.WhereEnumerableIterator`1.MoveNext() +85
  46. System.Linq.<ConcatIterator>d__71`1.MoveNext() +111
  47. System.Linq.Buffer`1..ctor(IEnumerable`1 source) +216
  48. System.Linq.Enumerable.ToArray(IEnumerable`1 source) +77
  49. System.Web.Http.Services.DefaultServices.GetServices(Type serviceType) +547
  50. Ninject.Web.WebApi.NinjectWebApiHttpApplicationPlugin.Start() +401
  51. Ninject.Web.Common.Bootstrapper.<Initialize>b__0(INinjectHttpApplicationPlugin c) +29
  52. Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map(IEnumerable`1 series, Action`1 action) +194
  53. Ninject.Web.Common.Bootstrapper.Initialize(Func`1 createKernelCallback) +205
  54. Ninject.Web.Common.OwinHost.<Execute>d__1.MoveNext() +259
  55. System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +93
  56. System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +52
  57. System.Runtime.CompilerServices.TaskAwaiter.GetResult() +21
  58. Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.<RunApp>d__5.MoveNext() +287
  59. System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +93
  60. System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +52
  61. System.Runtime.CompilerServices.TaskAwaiter.GetResult() +21
  62. Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.<DoFinalWork>d__2.MoveNext() +272
  63. System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +22
  64. Microsoft.Owin.Host.SystemWeb.Infrastructure.ErrorState.Rethrow() +33
  65. Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar) +150
  66. Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.EndFinalWork(IAsyncResult ar) +43
  67. System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +415
  68. System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement