Open Closed

Azure storage blob - Could not found the requested BLOB in the container #958


User avatar
0
geoffro created
  • ABP Framework version: v4.2.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hi, I have been trying to connect ot our azure blog storage but keep getting Could not found the requested BLOB 'xxxx.json' in the container 'xxx-xxxx'!.

I have followed both resources below with no success

https://docs.abp.io/en/abp/latest/Blob-Storing-Azure https://community.abp.io/articles/uploaddownload-files-to-azure-storage-with-the-abp-framework-sr7t3w4p

What am I missing? I am using the Secondary Connection String key for the Azure storage account which has the format below:

"DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=xxx;BlobEndpoint=xxx;QueueEndpoint=xxx/;TableEndpoint=xxx;FileEndpoint=xxx;"

I have also done the below

  • Installed 'Volo.Abp.BlobStoring.Azure' package to the Domain project
  • set the Blob Container to have public access
  • I can browse ok to the resource through the browser.
  • Can download the resource ok from Azure storage explorer
  • I Have setup code below within the Domain module:
Configure<AbpBlobStoringOptions>(options =>
            {
                options.Containers.ConfigureDefault(container =>
                {
                    container.UseAzure(azure =>
                    {
                        azure.ConnectionString = "xxx";
                        azure.ContainerName = "xxx-xxx";
                        azure.CreateContainerIfNotExists = false;
                    });
                });
            });

3 Answer(s)
  • User Avatar
    0
    Moyaoxiang created

    Hi geoffro, Usually this problem is due to the wrong ContainerName or BLOB Key being specified. In my tests, this works fine. Please make sure the file is in the host or tenants path.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    CreateContainerIfNotExists (bool): Default value is false, If a container does not exist in azure, AzureBlobProvider will try to create it.

    Set CreateContainerIfNotExists value to true otherwise you need to pre-create the BLOB container in Azure yourself

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11