Soenneker.Blob.Client
11.0.2276
Prefix Reserved
dotnet add package Soenneker.Blob.Client --version 11.0.2276
NuGet\Install-Package Soenneker.Blob.Client -Version 11.0.2276
<PackageReference Include="Soenneker.Blob.Client" Version="11.0.2276" />
<PackageVersion Include="Soenneker.Blob.Client" Version="11.0.2276" />
<PackageReference Include="Soenneker.Blob.Client" />
paket add Soenneker.Blob.Client --version 11.0.2276
#r "nuget: Soenneker.Blob.Client, 11.0.2276"
#:package Soenneker.Blob.Client@11.0.2276
#addin nuget:?package=Soenneker.Blob.Client&version=11.0.2276
#tool nuget:?package=Soenneker.Blob.Client&version=11.0.2276
Soenneker.Blob.Client
Resolves Azure BlobClient instances through a cached container client and creates a missing container before returning the blob client.
Install
dotnet add package Soenneker.Blob.Client
Configure the Azure Storage connection string:
{
"Azure": {
"Storage": {
"Blob": {
"ConnectionString": "<connection string>"
}
}
}
}
Keep the real value in an environment-specific secret provider rather than committing it to configuration files.
Register the utility in Program.cs:
using Soenneker.Blob.Client.Registrars;
builder.Services.AddBlobClientUtilAsSingleton();
The singleton registration is the usual choice. A scoped registration is available, but it still uses the singleton container cache.
Resolve a blob client
using Azure.Storage.Blobs;
using Soenneker.Blob.Client.Abstract;
public sealed class InvoiceStore(IBlobClientUtil blobClients)
{
public async ValueTask<BlobClient> GetInvoice(
Guid invoiceId,
CancellationToken cancellationToken)
{
return await blobClients.Get(
"invoices",
$"2026/{invoiceId:N}.pdf",
cancellationToken: cancellationToken);
}
}
relativeUrl is an Azure blob name, not a URL. Slashes create a virtual hierarchy in tools and listings, but the name remains one blob key.
The returned BlobClient can be used with the Azure SDK directly:
BlobClient blob = await blobClients.Get(
"invoices",
"2026/summary.pdf",
cancellationToken: cancellationToken);
await blob.UploadAsync(stream, overwrite: true, cancellationToken);
Container behavior
- Container names are converted to lowercase before lookup.
- The first lookup for a container checks Azure and creates it if missing.
PublicAccessType.Noneis the default and keeps a newly created container private.publicAccessTypeis used only when creating a missing container. It does not inspect or change the access policy of an existing container.- Container clients are cached by normalized container name. Use one consistent public-access choice for each container.
Operational notes
- Cancellation stops pending work; it does not undo work that has already completed.
- Resolving a blob client can perform a container existence check or creation, so it is not a purely local factory call.
- This utility does not upload, download, overwrite, delete, or authorize individual blobs; those behaviors come from the returned Azure SDK client and its credentials.
- Treat public container access as an explicit data-exposure decision. Prefer private containers and SAS URLs for limited external access.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Blob.Container (>= 11.0.3066)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Soenneker.Blob.Client:
| Package | Downloads |
|---|---|
|
Soenneker.Blob.Download
A utility library for Azure Blob download operations |
|
|
Soenneker.Blob.Sas
A utility library for Azure Blob SAS operations |
|
|
Soenneker.Blob.Delete
A utility library for Azure Blob storage delete operations |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.2276 | 132 | 11/11/2026 |
| 11.0.2275 | 106 | 11/11/2026 |
| 11.0.2274 | 65 | 11/11/2026 |
| 11.0.2273 | 130 | 11/11/2026 |
| 11.0.2272 | 64 | 11/11/2026 |
| 11.0.2271 | 82 | 11/11/2026 |
| 11.0.2270 | 69 | 11/11/2026 |
| 11.0.2269 | 407 | 11/3/2026 |
| 11.0.2268 | 163 | 11/3/2026 |
| 11.0.2267 | 178 | 11/3/2026 |
| 11.0.2266 | 127 | 11/3/2026 |
| 11.0.2265 | 187 | 11/3/2026 |
| 11.0.2264 | 376 | 10/27/2026 |
| 11.0.2263 | 102 | 10/27/2026 |
| 11.0.2262 | 249 | 10/27/2026 |
| 11.0.2261 | 170 | 10/26/2026 |
| 11.0.2260 | 163 | 10/26/2026 |
| 11.0.2259 | 101 | 10/26/2026 |
| 11.0.2258 | 161 | 10/26/2026 |
| 11.0.2257 | 156 | 10/26/2026 |
Updated Soenneker.Blob.Container to 11.0.3066