从Azure Blob存储SSIS下载文件

时间:2020-04-24 22:33:27

标签: ssis azure-storage-blobs

在SSIS程序包中,我添加了一个从blob存储下载文件的步骤,我能够连接到azure和其他所有内容,但是当我尝试列出blob时,我总是得到0

try
        {


            StorageCredentials storageCredentials = new StorageCredentials(accountName, accountKey);

            CloudStorageAccount cloudStorageAccount = new CloudStorageAccount(storageCredentials, useHttps: true);
            CloudBlobClient BlobClient = cloudStorageAccount.CreateCloudBlobClient();


            CloudBlobContainer container = BlobClient.GetContainerReference(containerBlob);


            IEnumerable<IListBlobItem> ListBlobs = container.ListBlobs(containerDirectory, true); //string.empty MessageBox.Show(container.GetDirectoryReference(containerDirectory).ListBlobs().Count().ToString()); //I'M ALWAYS GETTING 0 HERE

有人知道为什么会这样吗?

1 个答案:

答案 0 :(得分:0)

Nevermind Azure Blob存储区区分大小写