Open Closed

No BLOB Storage provider was registered! At least one provider must be registered to be able to use the Blog Storing System. #402


User avatar
0
rajamannar created
  • 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.BlobContainer1[[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.BlobContainer1[[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, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.CreateInstance(IEnumerable1 parameters) --- End of inner exception stack trace --- at Autofac.Core.Resolving.InstanceLookup.CreateInstance(IEnumerable1 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, IEnumerable1 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:

  1. Added the FileManagement module

  2. Added package Volo.Abp.BlobStoring.Azure

  3. Created the below private method in MyAppicationModule in *.web project

        private void ConfigureBlobStorage(IConfiguration configuration)
            {
                Configure&lt;AbpBlobStoringOptions&gt;(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"]);
                        });
    
                    });
                });
            }
    
    1. Called the above method in public override void ConfigureServices(ServiceConfigurationContext context)

Note: In the appsettings.json ConnectionString, ContainerName and CreateContainerIfNotExists defined.


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I will check it out.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Did you add [DependsOn(typeof(AbpBlobStoringAzureModule))] to your module class?

  • User Avatar
    0
    rajamannar created

    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

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35