我正在从另一家公司接手的Sitecore ASP.Net网站上工作。我能够建立网站并使它与给出的源代码一起使用。我现在正尝试移动一些东西来修复文件夹结构,使其与我们的标准结构匹配,这会引起问题。原始的git文件夹结构是RootFolder / Project.Web,其中Project.Web包含web.config和csproj文件,而RootFolder包含sln。我将结构更改为RootFolder / web / Website,其中Website是Project.Web文件夹的新名称。我在新路径下更新了.sln文件,找到了Project.Web.csproj,并更新了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
我在整个Website文件夹中搜索了指向旧Project.Web文件夹的所有路径,但是没有找到任何路径。我不确定如何创建它所请求的绑定,或者现在为什么会发生这种情况,但是在移动项目之前这不是问题。
答案 0 :(得分:0)
当我遇到这个问题时,原因是我的特殊情况与该声明有关
internal sealed class ComponentBindings : NinjectModule
当我上课public
时,它起作用了
public sealed class ComponentBindings : NinjectModule