Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Angus Atkins-Trimnell 5 posts 75 karma points
    1 week ago
    Angus Atkins-Trimnell

    Azure Blob Storage for Two Umbraco Sites Using Different Containers

    Hello all,

    I have two Umbraco 8.17.x instances, both of which are set up as Azure App Services. They are both configured to use the same Azure Blob Storage, but are pointed to different containers. The first one we set up is using the names "media" and "cache" for its storage containers. The second site uses "media2" and "cache2".

    The second site and first site are behaving differently.

    First Site: When I open a page on this site and view the Developer's Tools (Network tab), every request for a resource file from the Umbraco media folder gets a 302 redirect response to the blob storage container, followed by a 200 response when the resource is fetched from the blob storage container.

    Second Site: When I open a page on this site and view the Developer's Tools (Network tab), there is a mix of Umbraco media site requests that get 302 or 200 responses and requests to the blob storage container that get a 200 response. This behavior doesn't seem correct. I believe every request to to the Umbraco media folder should be met with a 302 response and the resource should be subsequently fetched from the blob storage container.

    I've confirmed that when I upload an image in the Umbraco back-end of either site, it gets uploaded to the appropriate storage container in the blob storage.

    My configuration for the second site is below.


      <add key="AzureBlobFileSystem.ContainerName:media" value="media2" />
      <add key="AzureBlobFileSystem.RootUrl:media" value="https://[storage account name]" />
      <add key="AzureBlobFileSystem.ConnectionString:media" value="DefaultEndpointsProtocol=https;AccountName=[storage account name];AccountKey=[account key];" />
      <add key="AzureBlobFileSystem.MaxDays:media" value="365" />
      <add key="AzureBlobFileSystem.UseDefaultRoute:media" value="true" />
      <add key="AzureBlobFileSystem.UsePrivateContainer:media" value="false" />


    <caching currentCache="AzureBlobCache">
           <cache name="AzureBlobCache" type="ImageProcessor.Web.Plugins.AzureBlobCache.AzureBlobCache, ImageProcessor.Web.Plugins.AzureBlobCache"
                 maxDays="365" browserMaxDays="7" folderDepth="6" trimCache="true">
                <setting key="CachedStorageAccount" value="DefaultEndpointsProtocol=https;AccountName=[storage account name];AccountKey=[account key];" />
                <setting key="CachedBlobContainer" value="cache2" />
                <setting key="UseCachedContainerInUrl" value="true" />


          <service prefix="remote.axd" name="RemoteImageService" type="ImageProcessor.Web.Services.RemoteImageService, ImageProcessor.Web">
                <setting key="MaxBytes" value="16194304" />
                <setting key="Timeout" value="3000" />
                <setting key="Protocol" value="http" />
                <add url="https://[storage account name]"/>
                <add url="https://[storage account name]"/>
                <add url="https://[storage account name]"/>
                [site host names here]
          <service prefix="media/" name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web">
                <setting key="Container" value="media2" />
                <setting key="MaxBytes" value="16194304" />
                <setting key="Timeout" value="30000" />
                <setting key="Host" value="https://[storage account name]" />
          <service name="AzureImageService" type="ImageProcessor.Web.Plugins.AzureBlobCache.AzureImageService, ImageProcessor.Web.Plugins.AzureBlobCache">
                <setting key="StorageAccount" value="DefaultEndpointsProtocol=https;AccountName=[storage account name];AccountKey=[account key];" />
                <setting key="Container" value="media2" />
                <setting key="AccessType" value="Blob" />

    The configuration for the first site is the same but with "media" instead of "media2" and "cache" instead of "cache2". Also, the "UseDefaultRoute:media" setting in Web.config is "false".

    Do I have my settings correct for using a non-standard name for the storage container?

    Has anyone else seen behavior in which some files are served from the Umbraco media folder and others from the blob storage container?

    Thanks for any help.


Please Sign in or register to post replies

Write your reply to: