question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Castle.MicroKernel.ComponentNotFoundException: "No component for supporting the service Abp.WebApi.Configuration.IAbpWebApiConfiguration was found

See original GitHub issue

I’m trying to change the configuration of the AbpWebApi module so it does not wrap dynamic API by default, but I get the following exception:

Castle.MicroKernel.ComponentNotFoundException: "No component for supporting the service Abp.WebApi.Configuration.IAbpWebApiConfiguration was found"

at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
at Castle.Windsor.WindsorContainer.Resolve[T]()
at Abp.Configuration.DictionaryBasedConfig.GetOrCreate[T](String name, Func1 creator) in D:\\Github\\aspnetboilerplate\\src\\Abp\\Configuration\\DictionaryBasedConfig.cs:line 113
at XXXXXApplicationModule.Initialize() in XXXXXXXX\aspnet-core\\src\\XXXXX.Application\\XXXXXApplicationModule.cs:line 33
at System.Collections.Generic.List1.ForEach(Action1 action)
at Abp.Modules.AbpModuleManager.StartModules() in D:\\Github\\aspnetboilerplate\\src\\Abp\\Modules\\AbpModuleManager.cs:line 48
at Abp.AbpBootstrapper.Initialize() in D:\\Github\\aspnetboilerplate\\src\\Abp\\AbpBootstrapper.cs:line 153"	string

It happens when I try to access the AbpWebApi() module, like here for example:

//XXXXXApplicationModule.cs
/* 33 */ Configuration.Modules.AbpWebApi().DefaultDynamicApiWrapResultAttribute.WrapOnError = true;
/* 34 */ Configuration.Modules.AbpWebApi().DefaultDynamicApiWrapResultAttribute.WrapOnSuccess = false;

I’m using ABP 3.3.0 with a fresh Angular and ASP.NET Core template (not MVC).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ismcagdascommented, Jan 22, 2018

@Trojaner25 first, you shouldn’t reference Abp.Web.Api nuget package to your project if it is ASP.NET Core. You can configure result wrapping like this in the PreInitialize method of your web module.

Configuration.Modules.AbpAspNetCore().DefaultWrapResultAttribute

Configuration.Modules.AbpAspNetCore().DefaultWrapResultAttribute.WrapOnError = false;
Configuration.Modules.AbpAspNetCore().DefaultWrapResultAttribute.WrapOnSuccess = false;
0reactions
Trojanercommented, Jan 22, 2018

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

No component for supporting the service Abp.Zero. ...
If I disable bg jobs by Configuration.BackgroundJobs.IsJobExecutionEnabled = false; I got another exception as below: Can't create component ' ...
Read more >
HTML 5 Document Viewer - "No component for supporting ...
MicroKernel.ComponentNotFoundException: "No component for supporting the service Abp.WebApi.Configuration.IAbpWebApiConfiguration was found
Read more >
Castle.MicroKernel.ComponentActivator. ...
ComponentNotFoundException : No component for supporting the service Abp.AspNetCore.Configuration.AbpAspNetCoreConfiguration was found.
Read more >
No component for supporting the service CMS.Helpers. ...
I am having kentico 11 website. When am trying to host and run it locally am getting following error. Server Error in '/'...
Read more >
ComponentNotFoundException when using ...
this throws the following exception. Castle.MicroKernel.ComponentNotFoundException : No component for supporting the service IFileWatcher was found
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found