A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

EPiServerAzureBlobs setup

Vote:
 

We’re in the process of setting up our CMS 12 environment and migrating content from CMS 11. In CMS 11, we handled blob storage by copying the blobs directly via the CMS 11 paasportal mirgration tool.

According to Optimizely support, for CMS 12 we should add services.AddCmsCloudPlatformSupport in our Startup.cs file. They explained that we don’t need to include the EPiServerAzureBlobs connection string in appsettings.json, since environment variables are supposed to handle that automatically. However, when we omit the connection string, none of our blobs appear.

The question I’m trying to resolve is whether there’s a way to configure a default setup that works consistently across environments. We don’t have direct access to their blob storage, and support has confirmed they won’t provide it. The documentation they shared only gives us a temporary link that seems to expire after about six hours. What we need is a stable, non-expiring configuration.

Any guidance or suggestions would be greatly appreciated.

#341255
Dec 11, 2025 16:42
Vote:
 

Hi

In DXP you can’t control the actual blob connection strings – Optimizely manages EPiServerAzureBlobs setting for you.
We move blobs between environments using the Deployment API instead of trying to access storage directly.
Locally we use file-based storage and only enable Cloud Platform support in real DXP environments:

if (_webHostingEnvironment.IsDevelopment())
{
    AppDomain.CurrentDomain.SetData(
        "DataDirectory",
        Path.Combine(_webHostingEnvironment.ContentRootPath, "App_Data"));
}

// DXP cloud hosting requirements
if (!_webHostingEnvironment.IsDevelopment()
    && _webHostingEnvironment.EnvironmentName != SiteConstants.Environment.TestEnvironment)
{
    services.AddCmsCloudPlatformSupport(_configuration);
}

#341257
Dec 11, 2025 22:59
Vote:
 

Thanks Scott  for raising this,  and thanks to Pär for the key points. Here’s a consolidated explanation with a bit more detail on EpiserverAzureBlobs setup for CMS 12 (especially on DXP).

EpiserverAzureBlobs is the Azure Blob Storage provider that Optimizely CMS uses for media assets in SaaS/DXP environments. It’s not a local file system storage provider - it’s meant to store and serve blobs from Azure.

Because DXP uses Azure App Services (and the local file system is ephemeral), the blob provider must be configured correctly so that:

  • Media URLs resolve to Azure

  • Uploads go to the correct container

  • Permissions and caching behave as expected

If it’s misconfigured, assets may fail to load from the CMS UI or public site.

 

What Pär Covered (and Why It Matters)

Pär pointed out that the Azure blob config must be registered before CMS initializes blob access. This is because:

  1. Blob client registration is read once at startup

  2. If configuration is missing or invalid at that time, the Azure provider won’t register

  3. Media requests or uploads quietly fall back (or fail)

This explains behavior where:

  • Local development works

  • But DXP reports missing blob behavior or upload errors

 

Correct EpiserverAzureBlobs Setup (CMS 12 / DXP)

1) Install the Provider Package (if not already)

Make sure you have:

dotnet add package EPiServer.Azure.Blobs

(or the equivalent package version for CMS 12 / Azure)

 

2) appsettings.json (or environment variables)

You need to configure the Azure Blob connection and container name. Typically:

"AzureBlobStorageOptions": {
  "ConnectionString": "<your-azure-storage-connection-string>",
  "ContainerName": "media"
}

 

3) Configure in Program.cs / Startup

Make sure this service registration is present before CMS blob services are used:

builder.Services.Configure<AzureBlobStorageOptions>(
    builder.Configuration.GetSection("AzureBlobStorageOptions"));

builder.Services.AddAzureBlobFileProvider();

Order matters:
Register the Azure blob provider before the CMS and before any blob-dependent service.

On .NET 6/7 minimal hosting that typically means:

var builder = WebApplication.CreateBuilder(args);

// Configure Azure blob options
builder.Services.Configure<AzureBlobStorageOptions>(
    builder.Configuration.GetSection("AzureBlobStorageOptions"));

// Add Azure blob file provider
builder.Services.AddAzureBlobFileProvider();

builder.Services.AddCms();

var app = builder.Build();

 

4) Verify Permissions

Make sure your storage key has:

  • Read / List / Write access to the blob container

  • MIME visibility for public assets (or appropriate SAS if protected)

Without proper permissions, CMS may upload blobs but not serve them.

 

5) Check Media URLs in the UI

Once configured:

  • Media uploaded via the UI should show URLs pointing to Azure (not local paths)

  • On DXP, the Azure blob host should be the canonical source

If URLs still point to local paths (e.g. /globalassets/...), then:

  • Blob provider registration did not take effect

  • Or defaults are overriding the provider

 

Hope this will helps you!

#341328
Dec 23, 2025 13:14
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.