;Castle.MicroKernel.ComponentNotFoundException: No component for supporting the service ****** was found
In Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, Boolean ignoreParentContext)
In Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments)
In Castle.Windsor.WindsorContainer.Resolve[T]()
In Abp.Dependency.IocManager.Resolve[T]() location D:\Github\aspnetboilerplate\src\Abp\Dependency\IocManager.cs:line 179
In Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver) location D:\Github\aspnetboilerplate\src\Abp\Dependency\IocResolverExtensions.cs:line 18
In Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, Boolean ignoreParentContext)
In Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments)
In Castle.Windsor.WindsorContainer.Resolve[T]()
In Abp.Dependency.IocManager.Resolve[T]() location D:\Github\aspnetboilerplate\src\Abp\Dependency\IocManager.cs:line 179
In Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver) location D:\Github\aspnetboilerplate\src\Abp\Dependency\IocResolverExtensions.cs:line 18
Castle.MicroKernel.ComponentNotFoundException
HResult=0x80131500
Message=No component for supporting the service was found
Source=Castle.Windsor
StackTrace:
at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, Boolean ignoreParentContext)
at Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments)
at Castle.Windsor.WindsorContainer.Resolve[T]()
at Abp.Dependency.IocManager.Resolve[T]()
at Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver)
Solution:
using (var bootstrapper = AbpBootstrapper.Create<OrderServiceModule>())
{
//bootstrapper.IocManager
// .IocContainer
// .AddFacility<LoggingFacility>(f => f.UseLog4Net().WithConfig(“log4net.config”));
bootstrapper.IocManager.IocContainer.AddFacility<LoggingFacility>(f => f.UseAbpLog4Net().WithConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, “log4net.config”)));
bootstrapper.Initialize();
using (var bootstrapper = AbpBootstrapper.Create<OrderServiceModule>())
{
//bootstrapper.IocManager
// .IocContainer
// .AddFacility<LoggingFacility>(f => f.UseLog4Net().WithConfig(“log4net.config”));
bootstrapper.IocManager.IocContainer.AddFacility<LoggingFacility>(f => f.UseAbpLog4Net().WithConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, “log4net.config”)));
bootstrapper.Initialize();
}