Store media library in Azure Blob

Mateusz Żebrowski asked on September 13, 2016 12:45


I'm trying to configure Kentico to stor media file in Azure Blob Storage. I've already found aritcle in documentation where this issue is decribe. I follow steps - add two keys in web.config, copy and change code as follow:

mediaProvider.CustomRootPath = "MyContainerThatIHaveInAzure";


StorageHelper.MapStoragePath("~/MySiteCodeName/media/", mediaProvider);

The rest of code is the same. MyContainerThatIHaveInAzure is new container without any files inside.

I've rebuild solution and open in my localhost. When I log in to administrator panel go to Media library application I can find list of media libaries that were already created. When I click on one of them to edit files inside i get follown error

FolderTree.FailedLoad: [ContainerInfoProvider.GetContainer]: Error when getting container (it may be caused by inability to connect to the cloud).

Does anyone have any ideas?

Correct Answer

Mateusz Żebrowski answered on September 20, 2016 08:00

If someone will encounter the same problem, try to add to web.config to appSettings following key:

<add key="CMSAzureBlobEndPoint" value="AzureBlobEndPoint />

Endpoint is probably something like this

0 votesVote for this answer Unmark Correct answer

Recent Answers

Brenden Kehren answered on September 13, 2016 15:45

I have a post on this here as well.

What is your blob storage container setup like? Is this property set to true in your code?

mediaProvider.PublicExternalFolderObject = true;
0 votesVote for this answer Mark as a Correct answer

Mateusz Żebrowski answered on September 14, 2016 07:38

Yes it is set on true. My blob storage is set to public. Should I configure something more?

0 votesVote for this answer Mark as a Correct answer

Filip Ligač answered on September 20, 2016 13:59

Brenden's solution usually works but for a future reference, you might also need to specify "CMSAzureBlobEndPoint" settings key in your web.config file. It is used as an endpoint for the connection to the blob service of your storage account.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.