Autofac.Core.DependencyResolutionException
HResult=0x80131500
Message=An exception was thrown while activating Volo.Abp.Settings.DefaultValueSettingValueProvider -> Volo.Abp.SettingManagement.SettingStore -> Volo.Abp.SettingManagement.SettingManagementStore.
Source=Autofac
StackTrace:
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.ResolveOperation.InvokePipeline(ResolveRequest request, DefaultResolveRequestContext requestContext)
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest request)
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest request)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Volo.Abp.Settings.SettingValueProviderManager.<>c__DisplayClass6_0.<.ctor>b__1(Type type)
at System.Linq.Enumerable.SelectIListIterator`2.ToList()
at Volo.Abp.Settings.SettingValueProviderManager.<>c__DisplayClass6_0.<.ctor>b__0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at Volo.Abp.Settings.SettingValueProviderManager.get_Providers()
at Volo.Abp.Settings.SettingProvider.<GetOrNullAsync>d__10.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at TestAbpApp.HelloWorldService.<SayHello>d__2.MoveNext() in D:\Programming\_play\TestAbpApp\aspnet-core\src\TestAbpApp.Application\HelloWorldService.cs:line 19
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
DependencyResolutionException: None of the constructors found with 'Volo.Abp.Autofac.AbpAutofacConstructorFinder' on type 'Volo.Abp.SettingManagement.SettingManagementStore' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.Abp.SettingManagement.ISettingRepository settingRepository' of constructor 'Void .ctor(Volo.Abp.SettingManagement.ISettingRepository, Volo.Abp.Guids.IGuidGenerator, Volo.Abp.Caching.IDistributedCache 1[Volo.Abp.SettingManagement.SettingCacheItem], Volo.Abp.Settings.ISettingDefinitionManager)'.
/src/MyApp.Domain/Settings/MyAppSettingDefinitionProvider.cs
public class TestAbpAppSettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
//Define your own settings here. Example:
context.Add(new SettingDefinition("Test"));
}
}
```
/src/MyApp.Application/HelloWorldService.cs
public class HelloWorldService : ITransientDependency
{
private readonly ISettingProvider _settingProvider;
public HelloWorldService(ISettingProvider settingProvider)
{
_settingProvider = settingProvider;
}
public async void SayHello()
{
Console.WriteLine("Hello World!");
var setting = await _settingProvider.GetOrNullAsync("Test");
Console.WriteLine(setting);
}
}
```
oh, and since there's no guide (unless someone points me to it!) then I propose that I submit an article on the community site with the steps/solution... 🤗
I am having a REALLY hard time getting a new ABP proj to run on anything other than local DEV in Visual Studio debugger. I can build an individual dockerfile and run it locally too but what I am TRYING to do is have a secure multi-tiered swarm of containers in a simple docker-compose.yml file.
There seems to be a lot of gotchas around getting reverse proxy to work with ASP and IdentityServer. I have spent 40h trying to get a working app to run on a hosting platform with live SSL certs.
Is there any clear, straightforward, up-to-date information on how to deploy ABP to a cloud environment via docker?
I have looked into the Microservices sample, and have been toying with getting that running, then adding in modules and apps via ABP Suite. Ultimately I am trying to have a seamless, robust DEV -> PROD workflow including CI + CD.
These are the guides and intel I have been referring to while trying to make this work:
https://support.abp.io/QA/Questions/908/ABP-app-deployed-with-reverse-proxy-is-using-http-for-authorisation-URL-instead-of-https https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-5.0 https://support.abp.io/QA/Questions/790/Containerised-Deployment---Docker-Compose https://codeburst.io/load-balancing-an-asp-net-core-web-app-using-nginx-and-docker-66753eb08204 https://docs.docker.com/engine/examples/dotnetcore/
Guides I'm basically following, but trying to add SSL via reverse proxy (nginx) https://aspnetboilerplate.com/Pages/Documents/Articles/Running-in-Docker-Containers-and-Building-a-Web-Farm-Load-Balancer-Scenario/index.html#module-zero-core-template-web-farm-on-docker-with-using-redis-and-haproxy https://volosoft.com/blog/Docker-Web-Farm-Example-with-Using-Redis,-Ha-proxy-and-ASP.NET-C
Details on the ABP project itself: was a new application template i spun up, added an entity and ran just fine