Hello All,
I have a website with two environments (in azure app services).
- Main site in production slot
- Test site in another slot in same app service
Also I have a storage account, containg two blob containers( Prod & Test).
In my app code module class, I am using the CustomRootPath different for both environments.
Below is for my Prod site and
protected override void OnInit()
{
base.OnInit();
// Creates a new StorageProvider instance
var mediaProvider = new StorageProvider("Azure", "CMS.AzureStorage");
// Specifies the target container
mediaProvider.CustomRootPath = "Prod";
// Makes the container publicly accessible
mediaProvider.PublicExternalFolderObject = true;
// Maps a directory to the provider
StorageHelper.MapStoragePath("~/mysite/files/", mediaProvider);
}
Below is for my test site
protected override void OnInit()
{
base.OnInit();
// Creates a new StorageProvider instance
var mediaProvider = new StorageProvider("Azure", "CMS.AzureStorage");
// Specifies the target container
mediaProvider.CustomRootPath = "Test";
// Makes the container publicly accessible
mediaProvider.PublicExternalFolderObject = true;
// Maps a directory to the provider
StorageHelper.MapStoragePath("~/mysite/files/", mediaProvider);
}
All the attachments in Prod site are working fine using kentico urls, but not working with Test site urls.
Both the blob containers having the same data.
I am accessing the attachment/media using the below URL formats
https://prodsite.com/CMSPages/GetFile.aspx?guid=487cb5d3-2d00-4197-b4e3-e321599ab6cd
https://testsite.com/CMSPages/GetFile.aspx?guid=487cb5d3-2d00-4197-b4e3-e321599ab6cd
The first URL is working fine but the second URL is getting the message "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
Please help me to resolve the above issue.
Thanks!