asp.net - Azure存储容器权限无法设置

标签 asp.net azure

背景

  • 我尝试通过 azure doc 学习使用 Azure blob 。

麻烦

  • 当我想使用这些代码时出现错误。
blobStorageAccount=probestudent

blobStorageAccountKey=$(az storage account keys list -g ProbeStudent \
-n $blobStorageAccount --query [0].value --output tsv) 

az storage container set-permission \ --account-name $blobStorageAccount \ --account-key $blobStorageAccountKey \ --name thumbnails  \
--public-access off

这些代码意味着Set container public access .

  • 这是我的容器状态。 enter image description here

  • 这是我的存储帐户状态。 enter image description here

  • 错误 enter image description here

最佳答案

如果命令在一行中,请删除字符\。符号 \ 仅在命令太长且需要另一行时使用。

以下命令正在运行:

az storage container set-permission --account-name $blobStorageAccount --account-key $blobStorageAccountKey --name thumbnails --public-access off

测试结果:

enter image description here

关于asp.net - Azure存储容器权限无法设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59786568/

相关文章:

c# - Javascript 将值传递给 asp.net

c# - 如何在 javascript 和 ASP.NET 中返回项目的当前域?

无论如何,Azure 管道都不会触发来自 Github 的标签

azure - 按订阅 ID 获取 Azure 组织

Javascript 错误隐藏在 ASP.NET 应用程序中

asp.net - 是否有任何 asp.net 数据缓存支持缓存条目的后台填充?

jquery - 使用 Jquery 将选项组添加到选项列表

azure - Azure表存储分区设计

azure - 将 C# Teams 消息传递扩展 (Bot) 部署到 Azure 的其他步骤?

azure - 无法找到编辑 Microsoft Azure Web Bot 样式的方法