November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Praveen
Sounds like the DXP blob provider configurations are not being applied correctly. Could also be that you configured your local blob provider in such a way that DXP cannot override it on start-up.
Did you configure the blob provider in appsettings.XXX.json or in your Startup.cs file?
Hi Stefan,
I configured it in my startup.cs file like this as per the documentation.
That's probably the reason. Ideally you would add this to your Startup.ConfigureServices method. And that will solve it all in DXP.
// Make sure to inject IWebHostEnvironment in the Startup constructor.
if (!_webHostingEnvironment.IsDevelopment())
{
services.AddCmsCloudPlatformSupport(_configuration);
// If you have a Commerce site, add this too.
services.AddCommerceCloudPlatformSupport(_configuration);
}
In appsettings.Development.json, you can put your local blob provider and connection strings etc.
Currently My Startup.ConfigureServices is like this
Yes, AddAzureBlobProvider is implied when using AddCmsCloudPlatformSupport, with configurations provided by Optimizely DXP. Besides, it should only be used in DXP (ie. Development).
This is a sample of a appSettings.Development.json file:
{
"EPiServer": {
"Cms": {
"BlobProviders": {
"DefaultProvider": "FileBlobProvider",
"Providers": {
"FileBlobProvider": "EPiServer.Framework.Blobs.FileBlobProvider, EPiServer.Framework"
}
},
"EventProvider": {
// On local development machine we don't care about other local sites' events.
// Not that it matters, though, as there is no default event provider in CMS 12.
"Provider": "EPiServer.Events.Providers.Internal.NullEventProvider, EPiServer.Events"
},
"FileBlobProvider": {
// Could also be a network UNC path for shared blob folders.
"Path": "C:\TEMP\Blobs\Project1"
}
}
}
}
Hi Stefan,
I am in process of migrating CMS11 to CMS12.
My CMS11 application blobs saved into network location and i have configured as per your suggestion blobs path but assets are not loading up.
Tried with json settings and from startp code (services.AddFileBlobProvider("FileBlobProvider", "\\XX.XX.XX.XX\\Shared\\BlobsData");) file as well but same issue.
All images were saving into different path (i.e. {web project folder}/app_data/blobs) , when i upload the image after upgrade the solution.
Can you please let me know your suggestions ?
Thanks,
Suresh B
You need to set the app data path either way
{
"EpiServer" : {
"CMS" : {
"Environment" : {
"AppDataPath": "\\XX.XX.XX.XX\\Shared\\BlobsData
}
}
}
}
or
services.Configure<EnvironmentOptions>(x => x.AppDataPath = "\\XX.XX.XX.XX\\Shared\\BlobsData")
Hi Mark,
Thanks for the update.
But still blobs were not showing up.
I have modified as per above, But the same folder structure was created with image in my local system (where i am running the application) instead of network path. Please refer screenshot example.
Just a guess, but is it possible you need two more slashes at the beginning of that path to indicate it's a network share path?
services.Configure<EnvironmentOptions>(x => x.AppDataPath = "\\\\XX.XX.XX.XX\\Shared\\BlobsData")
(where "xx.xx.xx.xx" is replaced by the IP or network path)
I think that should translate to the path: \\XX.XX.XX.XX\Shared\BlobsData
Hi, I configured Azure blob storage as a storage provider for a CMS 12 as per the Episerver documentation on How to add Azure Blob provider to your .net core application. The application is working fine in my local but somehow in DXP, it is using Built-in storage provider "App_Data" instead of using Azure blob storage even those these changes are deployed. We are using the Deployment API method for deployment.
Does it require any additional configuration to work in DXP? Or do we need to configure somehow that this is the default provider?