abpframework/abp · critical · AbpException

No BLOB Storage provider was registered! At least one provid

Error message

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

What it means

Thrown by DefaultBlobProviderSelector.Get when the IBlobProvider collection resolved from DI is completely empty. The Blob Storing System requires at least one backing provider (file system, database, Azure, AWS, etc.) registered as a module before any container can be used. An empty collection means no provider module was added to the dependency graph.

Source

Thrown at framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/DefaultBlobProviderSelector.cs:33

    public DefaultBlobProviderSelector(
        IBlobContainerConfigurationProvider configurationProvider,
        IEnumerable<IBlobProvider> blobProviders)
    {
        ConfigurationProvider = configurationProvider;
        BlobProviders = blobProviders;
    }

    [NotNull]
    public virtual IBlobProvider Get([NotNull] string containerName)
    {
        Check.NotNull(containerName, nameof(containerName));

        var configuration = ConfigurationProvider.Get(containerName);

        if (!BlobProviders.Any())
        {
            throw new AbpException("No BLOB Storage provider was registered! At least one provider must be registered to be able to use the BLOB Storing System.");
        }

        if (configuration.ProviderType == null)
        {
            throw new AbpException("No BLOB Storage provider was used! At least one provider must be configured to be able to use the BLOB Storing System.");
        }

        foreach (var provider in BlobProviders)
        {
            if (ProxyHelper.GetUnProxiedType(provider).IsAssignableTo(configuration.ProviderType))
            {
                return provider;
            }
        }

        throw new AbpException(
            $"Could not find the BLOB Storage provider with the type ({configuration.ProviderType.AssemblyQualifiedName}) configured for the container {containerName} and no default provider was set."
        );

View on GitHub (pinned to 7ed43b1931)

Solutions

  1. Add the desired provider module to your module's DependsOn attribute (e.g., [DependsOn(typeof(FileSystemBlobStoringModule))]).
  2. Ensure the provider NuGet package is referenced by the project that declares the module.
  3. For custom providers, register your IBlobProvider implementation in ConfigureServices.
  4. Verify the module loads by checking the DI container can resolve IEnumerable<IBlobProvider> at startup.

Example fix

// before: no provider module declared
[DependsOn(typeof(AbpBlobStoringModule))]
public class MyAppModule : AbpModule { }

// after: declare the file system provider module
[DependsOn(typeof(AbpBlobStoringModule))]
[DependsOn(typeof(FileSystemBlobStoringModule))]
public class MyAppModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpBlobStoringFileSystemOptions>(x => x.BaseFolder = "C:\\MyBlobs");
    }
}
Defensive patterns

Strategy: validation

Validate before calling

// At startup, assert at least one IBlobProvider is registered.
var providers = serviceProvider.GetServices<IBlobProvider>().ToArray();
if (providers.Length == 0)
{
    throw new InvalidOperationException("No IBlobProvider registered. Add a provider module (e.g., FileSystemBlobStoringModule) to DependsOn.");
}

Type guard

public static bool HasAnyBlobProvider(IServiceProvider sp) =>
    sp.GetServices<IBlobProvider>().Any();

Try / catch

try
{
    var provider = blobProviderSelector.Get(containerName);
}
catch (AbpException ex) when (ex.Message.Contains("No BLOB Storage provider was registered", StringComparison.Ordinal))
{
    logger.LogCritical(ex, "Missing blob provider module; cannot use blob storing.");
    throw;
}

Prevention

When it happens

Trigger: Any call path that resolves a blob container (IBlobContainer<T>.SaveAsync/GetAsync/etc.) when no IBlobProvider implementation is registered in the DI container. The selector queries IEnumerable<IBlobProvider> and finds zero entries.

Common situations: Forgetting to add the provider module (e.g., Volo.Abp.BlobStoring.FileSystem.FileSystemBlobStoringModule) to DependsOn; adding the package but not the module attribute; misconfiguring the module so the provider never registers; building a test host without a provider.

Related errors


AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13). Data as JSON: /api/errors/871c8e08c6ddf66f. Report an issue: GitHub.