ABP Framework version: v3.1.0
UI type: MVC
Tiered (MVC) or Identity Server Seperated (Angular): no
Exception message and stack trace: 2020-09-04 15:39:35.475 +01:00 [ERR] An exception was thrown while activating Volo.FileManagement.Directories.DirectoryDescriptorController -> Volo.FileManagement.Directories.DirectoryDescriptorAppService -> Volo.FileManagement.Directories.DirectoryManager -> Volo.FileManagement.Files.FileManager -> Volo.Abp.BlobStoring.BlobContainer
1[[Volo.FileManagement.FileManagementContainer, Volo.FileManagement.Domain, Version=3.0.5.0, Culture=neutral, PublicKeyToken=null]]. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.FileManagement.Directories.DirectoryDescriptorController -> Volo.FileManagement.Directories.DirectoryDescriptorAppService -> Volo.FileManagement.Directories.DirectoryManager -> Volo.FileManagement.Files.FileManager -> Volo.Abp.BlobStoring.BlobContainer
1[[Volo.FileManagement.FileManagementContainer, Volo.FileManagement.Domain, Version=3.0.5.0, Culture=neutral, PublicKeyToken=null]]. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Volo.Abp.BlobStoring.IBlobContainerFactory)' on type 'BlobContainer1'. ---> Volo.Abp.AbpException: No BLOB Storage provider was registered! At least one provider must be registered to be able to use the Blog Storing System. at Volo.Abp.BlobStoring.DefaultBlobProviderSelector.Get(String containerName) at Volo.Abp.BlobStoring.BlobContainerFactory.Create(String name) at lambda_method(Closure , Object[] ) at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() --- End of inner exception stack trace --- at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable
1 parameters) at Autofac.Core.Resolving.InstanceLookup.CreateInstance(IEnumerable1 parameters) --- End of inner exception stack trace --- at Autofac.Core.Resolving.InstanceLookup.CreateInstance(IEnumerable
1 parameters) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) at Autofac.Core.Resolving.ResolveOperation.ResolveComponent(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, IEnumerable1 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.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.Steps to reproduce the issue:
Added the FileManagement module
Added package Volo.Abp.BlobStoring.Azure
Created the below private method in MyAppicationModule in *.web project
private void ConfigureBlobStorage(IConfiguration configuration) { Configure<AbpBlobStoringOptions>(options => { options.Containers.ConfigureDefault(container => { container.UseAzure(azure => { azure.ConnectionString = configuration["AzureStorage:ConnectionString"]; azure.ContainerName = configuration["AzureStorage:ContainerName"]; azure.CreateContainerIfNotExists = Convert.ToBoolean(configuration["AzureStorage:CreateContainerIfNotExists"]); }); }); }); }
- Called the above method in public override void ConfigureServices(ServiceConfigurationContext context)
Note: In the appsettings.json ConnectionString, ContainerName and CreateContainerIfNotExists defined.
3 Answer(s)
-
0
I will check it out.
-
0
Did you add
[DependsOn(typeof(AbpBlobStoringAzureModule))]
to your module class? -
0
That worked.
[DependsOn(typeof(FileManagementWebModule))] [DependsOn(typeof(AbpBlobStoringAzureModule))]
both are needed. I assumed FileManagementWebModule will by default depends on this.And it has not been mentioned anywhere in the document as well...oops