Using Episerver 11 on Episerver Azure host
On a new site, I created many media images that are currently stored in the App_Data blob folder. I've installed the EpiCode.BlobConverter package to migrate these to Azure blob storage. I've confirmed that my Azure blob provider has been added to the web.config file.
<blob defaultProvider="azureblobs" xdt:Transform="Insert">
<add name="azureblobs" type="EPiServer.Azure.Blobs.AzureBlobProvider,EPiServer.Azure" connectionStringName="EPiServerAzureBlobs" container="mysitemedia"/>
However, when I run the "Convert File Blobs" job, I get the following error for all images.
System.IO.IOException: The process cannot access the file 'D:\home\site\wwwroot\App_Data\blobs\fff13e7fcf584be3869b7ba1113d3e74\42922beab0db42aeb9889606ebdec309_Thumbnail.png' because it is being used by another process.at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at EPiServer.Framework.Blobs.FileBlob.OpenWrite() at EPiServer.Framework.Blobs.FileBlob.Write(Stream data) at EPiCode.BlobConverter.BlobJob.ProcessFile(String path, String directory)
Any idea on how to convert these images to blob storage?
I'm unfamiliar with BlobConverter, but perhaps you can try to run Clear Thumbnail Properties job first to clear the thumbnail blobs, to reduce the migration time overall. Those thumbnails will be created on demand anyway.
Just tried clearing thumbnails. That job ran successfully and did clear quite a few. However, the same error when running BlobConverter. Thanks for the input.
So you have the file name that is "being used". You can use https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer, then Find -> Find Handle Or Dll, then search by the file name, you'll find out which process is using that find, then can kill it.
I am running this job on an Episerver hosted Azure environment. I don't have the ability to run that.
Then that is likely the problem. Your site does not have access to those files on DXC, and the error threw can be misleading.
I'd suggest to run that on local site with access to the files locally (You can point to the db on DXC)
If blob converter is not working then you can use the import/export process of Episerver.
First export your media items and import it to your azure site it will automatically upload it in blob storage.
Following the advice from Quan Mai above, I ran this site locally and the "Convert File Blobs" job ran successfully. I've viewed the site with the Azure Storage Explorer and can verify that the blobs are there. Thanks for everyone's help.