簡體   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