Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用VB.NET获取Azure blob上的容器列表_Vb.net_Azure Storage - Fatal编程技术网

使用VB.NET获取Azure blob上的容器列表

使用VB.NET获取Azure blob上的容器列表,vb.net,azure-storage,Vb.net,Azure Storage,我正在尝试访问blob上某个容器中的数据。我的App.config文件中有以下条目: <appSettings> <add key="BlobConnStr" value="DefaultEndpointsProtocol=https;AccountName=acct_name;AccountKey=acct_key" /> </appSettings> 问题是我不知道容器名称,所以我无法从代码中访问它。我需要检索容器中的文件列表。我怎样才能做到这一点?基本

我正在尝试访问blob上某个容器中的数据。我的App.config文件中有以下条目:

<appSettings>
<add key="BlobConnStr" value="DefaultEndpointsProtocol=https;AccountName=acct_name;AccountKey=acct_key" />
</appSettings>

问题是我不知道容器名称,所以我无法从代码中访问它。我需要检索容器中的文件列表。我怎样才能做到这一点?

基本上,您需要知道容器的名称,以便在其中获取blob。如果需要查看所有可用的容器,可以从blobClient中列出容器并从中选择一个。然后,使用列表中的容器可以调用ListBlob

 Dim storageAccount As CloudStorageAccount = CloudStorageAccount.Parse(ConfigurationManager.AppSettings("BlobConnStr"))
 Dim blobClient As CloudBlobClient = storageAccount.CreateCloudBlobClient()