【问题标题】:Error activating ILogManager: No matching bindings are available, and the type is not self-bindable激活 ILogManager 时出错:没有可用的匹配绑定,并且类型不可自绑定
【发布时间】:2018-11-07 20:45:08
【问题描述】:

我正在开发一个从另一家公司接手的 Sitecore ASP.Net 网站。我能够建立网站并让它与我提供的源代码一起工作。我现在正在尝试移动以修复文件夹结构以匹配我们的标准结构,这会导致问题。原始的 git 文件夹结构是 RootFolder/Project.Web,其中 Project.Web 包含 web.config 和 csproj 文件,而 RootFolder 包含 sln。我将结构更改为 RootFolder/web/Website,其中 Website 是 Project.Web 文件夹的新名称。我更新了在新路径中找到 Project.Web.csproj 的 .sln 文件,并更新了 IIS 中的站点以指向网站文件夹。解决方案构建成功。但是,我在加载时收到此错误:

[ActivationException: Error activating ILogManager
No matching bindings are available, and the type is not self-bindable.
Activation path:
  1) Request for ILogManager

Suggestions:
  1) Ensure that you have defined a binding for ILogManager.
  2) If the binding was defined in a module, ensure that the module has been loaded into the kernel.
  3) Ensure you have not accidentally created more than one kernel.
  4) If you are using constructor arguments, ensure that the parameter name matches the constructors parameter name.
  5) If you are using automatic module loading, ensure the search path and filters are correct.
]
   Ninject.KernelBase.Resolve(IRequest request) +1261
   Ninject.ResolutionExtensions.Get(IResolutionRoot root, IParameter[] parameters) +75
   Sitecore.Social.Client.Mvc.Pipelines.Initialize.RegisterSocialArea.DoProcess() +653
   (Object , Object[] ) +74
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +469
   Sitecore.Nexus.Web.HttpModule.Application_Start() +226
   Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +641
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +580
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +165
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +267
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +341

[HttpException(0x80004005): Error activating ILogManager
No matching bindings are available, and the type is not self-bindable.
Activation path:
  1) Request for ILogManager

Suggestions:
  1) Ensure that you have defined a binding for ILogManager.
  2) If the binding was defined in a module, ensure that the module has been loaded into the kernel.
  3) Ensure you have not accidentally created more than one kernel.
  4) If you are using constructor arguments, ensure that the parameter name matches the constructors parameter name.
  5) If you are using automatic module loading, ensure the search path and filters are correct.
]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +523
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +107

System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +688

我在整个网站文件夹中搜索了指向旧 Project.Web 文件夹的任何路径,但没有找到任何东西。我不确定如何创建它请求的绑定,或者为什么现在会发生这种情况,但在我移动项目之前这不是问题。

【问题讨论】:

    标签: asp.net kernel sitecore sitecore8.2


    【解决方案1】:

    当我遇到这个问题时,原因是我的这个声明的特殊情况

    internal sealed class ComponentBindings : NinjectModule
    

    当我上课 public 时,它起作用了

    public sealed class ComponentBindings : NinjectModule
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-06-26
      • 1970-01-01
      • 1970-01-01
      • 2013-01-28
      • 2023-03-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多