Copied to clipboard

Flag this post as spam?

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


  • Kong Yang 9 posts 77 karma points
    Mar 25, 2019 @ 18:39
    Kong Yang
    0

    Azure blob medias not being served after upgrade from 7.11.1 to 7.13.1

    I created a clone of dev/prod site and performed an upgrade from 7.11.1 to 7.13.1. I can view and browse images from the backoffice media folder but all azure media blob is no longer accessible from the site and url.

    I have checked the configuration files/credentials and there were no changes during the upgrade.

    Have anyone ran into this issue and what are other things I should try?

  • Chris Evans 90 posts 175 karma points c-trib
    Mar 25, 2019 @ 22:29
    Chris Evans
    0

    One time we encountered a similar issue, it was due to http vs. https

    Maybe check that all the host names are running under the same protocol?

  • Kong Yang 9 posts 77 karma points
    Mar 25, 2019 @ 23:45
    Kong Yang
    0

    Hi Chris,

    Thank you but it don't quite make sense though. I basically created a new branch of my develop branch which works locally and it has the same host name on http. All that is done to it was just upgrading from 7.11.1 to 7.13.1. There are a ton of files add and changes but no differences in the cache.config file other than return lines.

    I don't know if there are new changes in 7.13.1 that I am not aware of which needs to be modify.

  • Kong Yang 9 posts 77 karma points
    Mar 27, 2019 @ 20:38
    Kong Yang
    0

    After digging more on google yesterday, I read somewhere that upgrading to the latest is a manual step. I am doing that now but upgrading to the next version 7.11.2 my azure blob images are still getting a 404 from my site. If I use the azureblob.xx.xx.net url, they work. It seems like after the upgrade internally Umbraco is not using the configured url to my azure blob storage.

    What could I be missing or what have change that I am not aware of? Do I need to pre-pend the azure url in front of media?

  • Chris Evans 90 posts 175 karma points c-trib
    Mar 28, 2019 @ 20:53
    Chris Evans
    0

    Some other things to check:

    • rebuild your examine indexes (go to Developer section, Examine Management tab, and rebuild each index)
    • check your /config/imageprocessor/security.config file: make sure your dev site address is in the <whitelist> section for both http and https
    • make sure your azure host names and connection strings are all correct and the same in all of the imageprocessor config files, as well as /config/FileSystemProviders.config

    Also are you using a CDN at all for the Azure image delivery?

  • Kong Yang 9 posts 77 karma points
    Apr 10, 2019 @ 23:20
    Kong Yang
    0

    HI Chris,

    I tried all the steps you mention and it still didn't work. The thing I noticed after the upgrade is my FileSystemProviders.config had reset my provider back to the local media folder and even after commenting it out and putting the AzureBlobFileSystem provider that worked for 7.11.1, it still didn't work. The other strange thing is, in the media tab I can see my photos at the media level but once I open the image, there is nothing there. Below is my FileSystemProviders.config, Security.config and Cache.config file settings.

    Yes I do have a cdn setup for my azure blob storage and excuse my ignorance on how to properly post code on here.

    FileSystemProviders.config

    <?xml version="1.0"?><FileSystemProviders><!-- Media --><!--<Provider alias="media" type="Umbraco.Core.IO.PhysicalFileSystem, Umbraco.Core">
    <Parameters>
          <add key="virtualRoot" value="~/media/" />
    </Parameters>  </Provider>--><Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
    <Parameters>
      <add key="containerName" value="media"/>
      <add key="rootUrl" value="https://xxxxxxx.blob.core.windows.net/"/>
      <add key="connectionString" value="DefaultEndpointsProtocol=https;AccountName=XXXXXX;AccountKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"/>
    
        <!--Optional configuration value determining the maximum number of days to cache items in the browser.
        Defaults to 365 days.-->
    
      <add key="maxDays" value="365"/>
    
        <!--When true this allows the VirtualPathProvider to use the deafult "media" route prefix regardless 
        of the container name.-->
    
      <add key="useDefaultRoute" value="true"/>
    
        <!--When true blob containers will be private instead of public what means that you can't access the original blob file directly from its blob url.-->
    
      <add key="usePrivateContainer" value="false"/>
    </Parameters>  </Provider>   </FileSystemProviders>
    

    Security.config

    <?xml version="1.0" encoding="utf-8"?><security>   <services>
    <service name="LocalFileImageService" type="ImageProcessor.Web.Services.LocalFileImageService, ImageProcessor.Web" />
    <!--Disable the LocalFileImageService and enable this one when using virtual paths. -->
    <service prefix="media/" name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web">
      <settings>
        <setting key="Container" value="media/"/>
        <setting key="MaxBytes" value="8194304"/>
        <setting key="Timeout" value="30000"/>
        <setting key="Host" value="https://XXXXXX.blob.core.windows.net/"/>
      </settings>
    </service>
    <service prefix="remote.axd" name="RemoteImageService" type="ImageProcessor.Web.Services.RemoteImageService, ImageProcessor.Web">
      <settings>
        <setting key="MaxBytes" value="4194304" />
        <setting key="Timeout" value="3000" />
        <setting key="Protocol" value="http" />
      </settings>
      <whitelist>
          <!--REMOVED FOR SECURITY REASON-->
      </whitelist>
    </service>  </services></security>
    

    Cache.config

    <?xml version="1.0" encoding="utf-8"?><caching currentCache="AzureBlobCache">  <caches>  <cache name="AzureBlobCache" type="ImageProcessor.Web.Plugins.AzureBlobCache.AzureBlobCache, ImageProcessor.Web.Plugins.AzureBlobCache" maxDays="365"
    memoryMaxMinutes="60" browserMaxDays="7">
      <settings>
        <setting key="CachedStorageAccount"
            value="DefaultEndpointsProtocol=https;AccountName=XXXXX;AccountKey=XXXXXXXXXXXXXXXXXXXX"/>
        <setting key="CachedBlobContainer" value="cache"/>
        <setting key="UseCachedContainerInUrl" value="true"/>
        <setting key="CachedCDNRoot" value="https://XXXXXXXXXXXXX.blob.core.windows.net/"/>
        <setting key="CachedCDNTimeout" value="1000"/>
        <setting key="SourceStorageAccount"
            value="DefaultEndpointsProtocol=https;AccountName=XXXXXX;AccountKey=XXXXXXXXXXXXXXXXXXXXXXXXXX"/>
        <setting key="SourceBlobContainer" value="media"/>
        <setting key="StreamCachedImage" value="false"/>
      </settings>
    </cache></caches></caching>
    
Please Sign in or register to post replies

Write your reply to:

Draft