Azure Blob storage issue

Danny Winbourne asked on June 13, 2022 15:47

I followed the steps on the excellent blog post from Brian McKeiver on how to setup Kentico to use Azure Blog storage.

I am however facing an issue when trying to load the images on my MVC project. I am getting 404 errors when trying to view the image using the "/getmedia/" path. It works fine when using the same path on the admin site.

i.e. (MVC site) does not work but (admin site) does work.

I have the required 2 settings inside web.config, I have confirmed that the DLL has been copied in the BIN folder, and have included AssemblyDiscoverable inside AssemblyInfo.cs as per the instructions.

I can also confirm that the image is showing correctly in azure storage.

Hopefully, I am missing something simple..

Correct Answer

Danny Winbourne answered on June 13, 2022 16:10

Doh! Found issue. I was connecting to a different database on MVC that I was on admin.

1 votesVote for this answer Unmark Correct answer

Recent Answers

Brenden Kehren answered on June 13, 2022 15:56

The code for your custom Azure storage provider needs to be in both the CMS project and the MVC project.

0 votesVote for this answer Mark as a Correct answer

Danny Winbourne answered on June 13, 2022 16:03

Thanks for your reply Brenden. I have included the custom project in both CMS and MVC projects and confirmed that the DLLs are being copied to the BIN folder in both cases.

0 votesVote for this answer Mark as a Correct answer

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