繁体   English   中英

在 web 应用程序中安装 azure 文件共享时,我得到一个 state 的 InvalidCredentials

[英]When mounting an azure file share in a web app I get a state of InvalidCredentials

我在存储帐户中设置了文件共享。 当我尝试将它安装在我的 Web 应用程序中时,我得到以下响应:

  "nexport-shared": {
    "accessKey": "hidden==",
    "accountName": "hidden",
    "mountPath": "\\\\nexportshared",
    "shareName": "nexportcampusbetashare",
    "state": "InvalidCredentials",
    "type": "AzureFiles"
  }

我正在使用下面的 az CLI 命令:

az webapp config storage-account add --resource-group "GROUPNAME" --name "WEBAPPNAME" --custom-id nexport-shared --storage-typeAzureFiles --share-name nexportcampusbetashare --account-name STORAGEACCOUNT --access-key "hidden==" --mount-path "\\nexportshared" --verbose --debug

当我运行“az webapp config list”时,它显示在列表中,但仍然带有 InvalidCredentials

一个可能的原因是您输入了无效的密钥或存储帐户来装载 Azure 文件。 更正这些参数为我解决了这个问题。

在此处输入图片说明

固定如下

在此处输入图片说明

你可能需要关闭或修改 Azure-Cli 和应用服务的存储帐户上的防火墙才能看到它。

我得到相同的响应并且文件共享按预期工作。
另外我刚刚发现了一个关于此的问题,似乎是来自 API 的响应消息中的一个错误:
https://github.com/Azure/azure-cli/issues/21571

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM