abpframework/abp · error · AbpException
Storage zone '{containerName}' not found
Error message
Storage zone '{containerName}' not found What it means
Thrown inside DefaultBunnyClientFactory.CreateAsync's cache factory when GetStorageZoneAsync returns null (no matching, non-deleted zone found for the container name). It is raised within the GetOrAddAsync value-factory, so it propagates before any cached value can be stored. The message names the containerName that could not be resolved to a storage zone.
Source
Thrown at framework/src/Volo.Abp.BlobStoring.Bunny/Volo/Abp/BlobStoring/Bunny/DefaultBunnyClientFactory.cs:44
IHttpClientFactory httpClient,
IDistributedCache<BunnyStorageZoneModel> cache,
IStringEncryptionService stringEncryptionService)
{
_cache = cache;
_httpClientFactory = httpClient;
_stringEncryptionService = stringEncryptionService;
}
public virtual async Task<BunnyCDNStorage> CreateAsync(string accessKey, string containerName, string region = "de")
{
var cacheKey = $"{CacheKeyPrefix}{containerName}";
var storageZoneInfo = await _cache.GetOrAddAsync(
cacheKey,
async () => {
var result = await GetStorageZoneAsync(accessKey, containerName);
if (result == null)
{
throw new AbpException($"Storage zone '{containerName}' not found");
}
// Encrypt the sensitive password before caching
result.Password = _stringEncryptionService.Encrypt(result.Password!)!;
return result;
},
() => new DistributedCacheEntryOptions
{
AbsoluteExpiration = DateTimeOffset.Now.Add(CacheDuration)
}
);
if (storageZoneInfo == null)
{
throw new AbpException($"Could not retrieve storage zone information for container '{containerName}'");
}
// Decrypt the password before using itView on GitHub (pinned to 7ed43b1931)
Solutions
- Confirm the container name exactly matches an existing storage zone in the Bunny dashboard.
- Ensure the AccessKey corresponds to the account that owns the zone.
- Create the zone in Bunny (or enable CreateContainerIfNotExists) before operating.
- Check the zone is not marked Deleted.
Example fix
// before
"Bunny": { "ContainerName": "media-zone" }
// after (name matches an existing Bunny storage zone)
"Bunny": { "ContainerName": "my-media-zone" } Defensive patterns
Strategy: validation
Validate before calling
// Before first operation, confirm the zone name resolves in your Bunny account:
// (call EnsureStorageZoneExistsAsync with createIfNotExists as desired)
if (containerName.IsNullOrWhiteSpace())
throw new InvalidOperationException("Bunny ContainerName is not configured."); Type guard
bool zoneLikelyExists = !containerName.IsNullOrWhiteSpace() && !accessKey.IsNullOrWhiteSpace();
Try / catch
try { await container.SaveAsync(blobName, stream); }
catch (AbpException ex) when (ex.Message.Contains("Storage zone") && ex.Message.Contains("not found"))
{ /* create the zone in Bunny or fix the container name */ } Prevention
- Confirm the storage zone exists in the Bunny dashboard under the matching account.
- Ensure the AccessKey belongs to the account that owns the zone.
- Avoid deleted zones; the lookup skips Deleted zones.
When it happens
Trigger: Creating a BunnyCDNStorage client (CreateAsync) for a containerName that has no corresponding storage zone in the Bunny account, or whose only matching zone is marked Deleted. Triggered on the first blob operation needing a client.
Common situations: Container name typo, zone not yet created in the Bunny dashboard, zone was deleted, or the AccessKey belongs to a different account that does not own the zone.
Related errors
- Failed to validate storage zone '{containerName}': {ex.Messa
- Could not retrieve storage zone information for container '{
- Storage zone '{containerName}' does not exist. Set createIfN
- Container name contains invalid characters: {containerName}.
- Container name must be between {MinLength} and {MaxLength} c
AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13).
Data as JSON: /api/errors/49294552311ee5a5.
Report an issue: GitHub.