我有一个要求,在创建公司时,我的storageaccount中创建了一个关联的blob存储容器,容器名称设置为传入的字符串变量.我尝试了以下操作:
public void AddCompanyStorage(string subDomain)
{
//get the storage account.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
System.Configuration.ConfigurationManager.AppSettings["StorageConnectionString"].ToString());
//blob client now
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
//the container for this is companystyles
CloudBlobContainer container = new CloudBlobContainer("https://mystore.blob.core.windows.net/" + subDomain);
}
Run Code Online (Sandbox Code Playgroud)
然而,这并没有像我预期的那样创建容器,我是否以错误的方式进行此操作?这可能吗?
干杯