Introduction
IPv6 is becoming an important part of modern cloud networking. As applications, connected devices, IoT systems, and distributed services continue to grow, organizations need a networking model that supports a much larger address space and modern connectivity requirements.
Azure Storage provides IPv6 connectivity through dedicated IPv6 endpoints for supported storage services. This allows applications to connect over IPv6 while continuing to use existing Azure Storage SDKs and APIs.
For .NET developers, this means existing applications can gradually adopt IPv6 without redesigning their storage integration or introducing a completely different client library.
In this article, we will explore how to configure IPv6 endpoints for an Azure Storage account, connect a .NET application using the Azure Storage SDK, upload and download files, and troubleshoot common connectivity problems.
Understanding IPv6 Support in Azure Storage
IPv6 uses 128-bit addresses, compared with the 32-bit addresses used by IPv4. This provides a significantly larger address space and supports the growing networking requirements of cloud applications and connected devices.
Azure Storage supports dedicated IPv6 endpoints alongside existing IPv4 endpoints. Both endpoint types provide access to the same storage account and its data.
For example, a storage account named mystorageaccount can use the following Blob Storage endpoints:
The IPv6 endpoint uses DNS AAAA records for address resolution. Applications should use the endpoint hostname instead of hardcoding an IP address. This allows DNS and the networking stack to handle address resolution correctly.
The main advantage is that developers can migrate applications gradually. Existing IPv4 clients can continue working while selected .NET applications begin using IPv6.
Supported Azure Storage Services
The IPv6 endpoint capability supports the following Azure Storage services through their supported REST APIs and SDKs.
Azure service | IPv6 endpoint format |
|---|
Blob Storage | https://<account>-ipv6.blob.core.windows.net |
Azure Files | https://<account>-ipv6.file.core.windows.net |
Table Storage | https://<account>-ipv6.table.core.windows.net |
Queue Storage | https://<account>-ipv6.queue.core.windows.net |
The endpoint format depends on the storage service. Always verify the supported endpoint format and availability for your storage account before implementing the integration.
Prerequisites for Connecting .NET Applications Over IPv6
Before changing your .NET application, prepare the Azure environment and verify that the client network supports IPv6.
You will need:
An active Azure subscription.
An Azure Storage account.
An IPv6-capable development or hosting environment.
The Azure Storage SDK for .NET.
Appropriate authentication permissions.
Network access to the storage account's IPv6 endpoint.
For this implementation, we will use Azure Blob Storage with a .NET application.
The application will authenticate using Microsoft Entra ID through DefaultAzureCredential. This approach avoids storing storage account access keys directly in application code.
Enabling IPv6 Endpoints for Azure Storage
Azure requires the relevant subscription feature registration before enabling IPv6 endpoints where preview registration is applicable.
Register the Azure subscription
Open Azure Cloud Shell or a terminal with the Azure CLI installed.
First, select the subscription you want to use.
az account set --subscription "<subscription-id>"
Register the IPv6 endpoint feature if required by the current Azure preview configuration.
az feature register \
--namespace Microsoft.Storage \
--name AllowPublishingIPv6Endpoints
Check the registration status.
az feature show \
--namespace Microsoft.Storage \
--name AllowPublishingIPv6Endpoints
Wait until the feature registration reaches the registered state.
You may also need to refresh the Microsoft.Storage resource provider registration.
az provider register --namespace Microsoft.Storage
Feature registration requirements can change as Azure capabilities evolve. Verify the current feature name and registration requirements before running these commands.
Enable IPv6 on the storage account
After registering the subscription feature, enable IPv6 endpoint publishing for your storage account if the feature is available in your subscription.
An illustrative Azure CLI command is:
az storage account update \
--resource-group "MyResourceGroup" \
--name "mystorageaccount" \
--publish-ipv6-endpoint true
This updates the storage account configuration to publish the dedicated IPv6 endpoint while preserving the existing IPv4 endpoint.
You can also configure supported networking options through the Azure portal.
Open the Azure portal.
Navigate to your storage account.
Open the networking configuration.
Review the available Internet Protocol settings.
Enable the supported IPv6 option.
Save the changes.
Allow time for the endpoint configuration and DNS records to become available.
Configuring a .NET Application to Use Azure Storage Over IPv6
The Azure Storage SDK for .NET does not require a separate IPv6-specific client library. The important change is the endpoint supplied when creating the storage client.
The following example uses the Azure Blob Storage SDK.
Install the required NuGet packages
Install the Azure Storage Blobs and Azure Identity packages.
dotnet add package Azure.Storage.Blobs
dotnet add package Azure.Identity
The first package provides Blob Storage operations, while Azure.Identity provides authentication through Microsoft Entra ID.
Create the Blob Storage client
Create a service class that connects to the IPv6 endpoint.
using Azure.Identity;
using Azure.Storage.Blobs;
public class BlobStorageService
{
private readonly BlobServiceClient _blobServiceClient;
public BlobStorageService()
{
string accountName = "mystorageaccount";
string endpoint =
$"https://{accountName}-ipv6.blob.core.windows.net";
_blobServiceClient = new BlobServiceClient(
new Uri(endpoint),
new DefaultAzureCredential()
);
}
public async Task UploadFileAsync(
string containerName,
string filePath)
{
BlobContainerClient container =
_blobServiceClient.GetBlobContainerClient(containerName);
await container.CreateIfNotExistsAsync();
string fileName = Path.GetFileName(filePath);
BlobClient blob = container.GetBlobClient(fileName);
await blob.UploadAsync(filePath, overwrite: true);
}
}
There are two important parts of this implementation.
First, the endpoint contains the IPv6-specific hostname. This directs the SDK to the dedicated IPv6 endpoint instead of the standard endpoint.
Second, DefaultAzureCredential provides a flexible authentication mechanism. During development, it can use supported developer credentials. In Azure, it can use an appropriately configured managed identity.
The application identity must have the required data-plane permissions, such as Storage Blob Data Contributor, to upload files.
Upload a file to Azure Blob Storage
You can call the service from a console application.
var storageService = new BlobStorageService();
await storageService.UploadFileAsync(
"documents",
"sample.pdf"
);
Console.WriteLine("File uploaded successfully.");
The SDK handles HTTP communication, authentication, and request processing. The application does not need to manually construct IPv6 packets or manage IP addresses.
Download a file from Azure Blob Storage
The same client can download files through the IPv6 endpoint.
Add the following method to the service class.
public async Task DownloadFileAsync(
string containerName,
string blobName,
string destinationPath)
{
BlobContainerClient container =
_blobServiceClient.GetBlobContainerClient(containerName);
BlobClient blob = container.GetBlobClient(blobName);
await blob.DownloadToAsync(destinationPath);
}
Usage:
await storageService.DownloadFileAsync(
"documents",
"sample.pdf",
"downloaded-sample.pdf"
);
Because the client was created using the IPv6 endpoint, the download operation uses the same endpoint configuration.
Configuring Network Security for IPv6
Enabling IPv6 endpoints does not automatically make every client eligible to access the storage account.
Storage networking rules must allow the application's IPv6 source address or address range when the account uses network restrictions.
For example, a storage account with a default network action of Deny can require explicit IPv6 firewall rules.
An illustrative networking configuration is:
{
"properties": {
"networkAcls": {
"defaultAction": "Deny",
"ipv6Rules": [
{
"action": "Allow",
"value": "2001:db8:1234::/64"
}
]
}
}
}
The IPv6 address range above is an example documentation prefix, not a production network range. Replace it with the actual IPv6 CIDR range used by your application.
You should also review network security groups, routing policies, and outbound connectivity on the client side.
Verifying IPv6 Connectivity From a .NET Environment
After configuring the storage account and application, verify that the endpoint resolves correctly and that the application can establish an HTTPS connection.
Check DNS resolution
On a Windows development machine, run:
nslookup -type=AAAA mystorageaccount-ipv6.blob.core.windows.net
On Linux or macOS, use:
dig AAAA mystorageaccount-ipv6.blob.core.windows.net
The response should contain an IPv6 address.
If DNS does not return an AAAA record, verify that IPv6 endpoint publishing is enabled and that the DNS configuration has been updated.
Test HTTPS connectivity
Use curl to check whether the endpoint is reachable.
curl -6 -I https://mystorageaccount-ipv6.blob.core.windows.net
An HTTP response confirms that the endpoint is reachable at the network and HTTP layers. A 403 or authentication-related response does not necessarily indicate a connectivity failure. It may simply mean that the request was not authenticated or authorized.
You can also test the endpoint from .NET.
using var client = new HttpClient();
var response = await client.GetAsync(
"https://mystorageaccount-ipv6.blob.core.windows.net"
);
Console.WriteLine($"Status: {response.StatusCode}");
This is a basic connectivity check. For actual storage operations, use the Azure Storage SDK and proper authentication.
IPv4 vs. IPv6 Connectivity in .NET Applications
Both protocols can be useful in modern cloud applications. The right choice depends on the application's hosting environment, network infrastructure, and integration requirements.
Feature | IPv4 | IPv6 |
|---|
Address size | 32-bit | 128-bit |
Address availability | Limited address space | Very large address space |
Azure Storage endpoint | Existing endpoint | Dedicated IPv6 endpoint |
DNS record | A record | AAAA record |
.NET SDK support | Supported | Uses the same SDK APIs |
Network requirements | IPv4 connectivity | IPv6 connectivity |
Migration approach | Existing configuration | Can be adopted incrementally |
An important consideration is that an application using an IPv6 endpoint needs an IPv6-capable network path. Simply changing the endpoint hostname does not make an IPv4-only hosting environment capable of communicating over IPv6.
Best Practices for Production .NET Applications
Moving a production application to IPv6 requires more than changing the storage endpoint. Developers should consider authentication, configuration management, monitoring, network compatibility, and failure handling.
Keep storage endpoints in configuration
Avoid hardcoding storage endpoints inside service classes. Store them in application configuration so that different environments can use different endpoints.
For example, an appsettings.json file can contain:
{
"AzureStorage": {
"BlobEndpoint": "https://mystorageaccount-ipv6.blob.core.windows.net"
}
}
Read the endpoint through the configuration system and inject the resulting client into application services. This makes it easier to switch between IPv4 and IPv6 without modifying application code.
Use managed identity for authentication
For applications hosted in Azure, managed identity is generally preferable to storing account keys or connection strings in source code.
Assign the application identity the minimum required storage data permissions. This reduces the risk of credential exposure and simplifies credential rotation.
Implement retry and timeout handling
Network failures can occur because of DNS problems, routing changes, temporary service interruptions, or unavailable network paths.
Use the retry policies available in the Azure SDK and configure them according to your application's requirements. Avoid unlimited retries because they can increase request delays and put additional pressure on dependent services.
Monitor IPv6 connectivity separately
Monitor storage request failures, response times, authentication errors, and network connectivity.
During migration, compare the behavior of IPv4 and IPv6 workloads. This helps identify whether a problem is related to the storage service, DNS, authentication, or the application's network environment.
Introduce IPv6 gradually
Do not switch every application simultaneously. Start with a non-production environment, validate uploads and downloads, and then move selected production workloads.
Keep the existing IPv4 endpoint available as part of your migration strategy.
Common Mistakes and Troubleshooting
The following problems can occur when connecting .NET applications to Azure Storage through IPv6.
Problem | Possible reason | Recommended solution |
|---|
DNS resolution fails | IPv6 endpoint is not published | Verify storage account configuration |
Connection timeout | Client network lacks IPv6 connectivity | Check routing and outbound network access |
HTTP 403 response | Missing permissions or firewall restrictions | Verify identity permissions and network rules |
Authentication failure | Incorrect credential configuration | Review managed identity and Entra ID permissions |
Upload fails | Incorrect endpoint or container configuration | Verify the endpoint and container |
Application works over IPv4 but not IPv6 | Hosting environment does not support IPv6 | Validate the hosting network before migration |
Using the IPv4 endpoint by mistake
One common mistake is enabling IPv6 on the storage account but continuing to use the original endpoint.
var client = new BlobServiceClient(
new Uri("https://mystorageaccount.blob.core.windows.net"),
new DefaultAzureCredential()
);
This example uses the standard endpoint, not the dedicated IPv6 endpoint.
For the IPv6 endpoint, use:
var client = new BlobServiceClient(
new Uri("https://mystorageaccount-ipv6.blob.core.windows.net"),
new DefaultAzureCredential()
);
Assuming IPv6 support is enabled everywhere
Another mistake is assuming that every hosting platform, network gateway, container environment, or corporate network supports IPv6.
Before deployment, verify the complete network path between the .NET application and Azure Storage. This includes DNS resolution, routing, outbound connectivity, firewall policies, and any intermediate network appliances.
Advantages and Disadvantages of Using IPv6 With Azure Storage
Advantages
Larger address space: IPv6 provides a significantly larger address space for applications and connected devices.
Native connectivity: IPv6-capable applications can connect without requiring IPv4 translation gateways.
Gradual migration: Existing IPv4 endpoints can continue working, allowing teams to migrate applications incrementally.
Existing SDK compatibility: .NET developers can continue using the Azure Storage SDK without introducing a separate IPv6-specific SDK.
Improved network flexibility: Organizations can align their storage connectivity with modern dual-stack networking architectures.
Disadvantages
Network compatibility: Applications require an IPv6-capable network path.
Configuration complexity: DNS, firewall rules, routing, and hosting environments must be checked.
Preview considerations: Preview capabilities can have limitations and may change before general availability.
Troubleshooting requirements: Teams may need additional monitoring and networking knowledge to identify IPv6-specific problems.
Summary
Connecting .NET applications to Azure Storage over IPv6 provides another option for building modern cloud applications. With dedicated IPv6 endpoints, developers can access supported Azure Storage services without changing the underlying storage APIs.
The implementation is straightforward from a .NET perspective. Developers need to enable IPv6 endpoint publishing on the storage account, verify network connectivity, and configure the Azure Storage SDK with the appropriate IPv6 endpoint.
For production applications, managed identity, secure network rules, configurable endpoints, retry policies, and gradual migration are important considerations.
As IPv6 adoption grows, understanding how to integrate it with Azure services will help .NET developers build applications that are more adaptable to modern cloud networking requirements.
Join the conversation! Your thoughts help the community grow.