Error activating ILogManager: No matching bindings are available, and the type is not self-bindable

661 views Asked by At

I'm working on a Sitecore ASP.Net website that I took over from another firm. I was able to set up the website and get it working with the source code I was given. I am now trying to move things around to fix the folder structure to match our standard structure, and this is causing problems. The original git folder structure was RootFolder/Project.Web, where Project.Web contained the web.config and csproj file, and RootFoldercontains the sln. I changed the structure to RootFolder/web/Website, with Website being the new name of the Project.Web folder. I updated the .sln file find Project.Web.csproj at the new path and updated the site in IIS to point to the Website folder. The solution builds successfully. However, I get this error on load:

[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

I searched the entire Website folder for any paths that pointed to the old Project.Web folder, but did not find anything. I'm not sure how to create the binding that it's requesting or why this is happening now but wasn't a problem before I moved the project.

1

There are 1 answers

0
T.S. On

When I had this issue, the reason was for my particular case with this declaration

internal sealed class ComponentBindings : NinjectModule

When I made my class public, it worked

public sealed class ComponentBindings : NinjectModule