gpt4 book ai didi

c# - 检查 Web 应用程序配置设置 - Microsoft Azure

转载 作者:行者123 更新时间:2023-12-03 06:44:06 25 4
gpt4 key购买 nike

我正在学习 Microsoft Learn 区域的教程,以使用 Azure 存储将图像数据上传到云中。

本教程指导用户从公共(public) Github 示例存储库部署 Web 应用,配置 Web 应用设置,然后将其保存到存储帐户。

我已完成这些步骤:您好,

我正在学习 Microsoft Learn 区域的教程,以使用 Azure 存储将图像数据上传到云中。

https://learn.microsoft.com/en-us/azure/event-grid/storage-upload-process-images?tabs=dotnet%2Cazure-powershell#feedback

本教程指导用户从公共(public) Github 示例存储库部署 Web 应用,配置 Web 应用设置,然后将其保存到存储帐户。

我已完成以下步骤:

从 GitHub 存储库部署示例应用程序配置网络应用程序设置我已完成“上传图像”部分的一半,但该图像未显示在我拥有的 Microsoft Azure 存储帐户中。

有什么要检查的想法吗?有没有办法检查我的网络应用程序配置设置,包括查看链接的存储帐户?谢谢,

罗伯特

最佳答案

我已使用 PowerShell 命令并且能够毫无问题地上传和查看图像。

请检查以下命令并遵循相同的命令,不要进行任何更改。

New-AzResourceGroup -Name -Location southeastasia

$blobStorageAccount="myblobha"

New-AzStorageAccount -ResourceGroupName myRGroup -Name $blobStorageAccount -SkuName Standard_LRS -Location southeastasia -Kind StorageV2 -AccessTier Hot


$blobStorageAccountKey = ((Get-AzStorageAccountKey -ResourceGroupName myRGroup -Name $blobStorageAccount)| Where-Object {$_.KeyName -eq "key1"}).Value
$blobStorageContext = New-AzStorageContext -StorageAccountName $blobStorageAccount -StorageAccountKey $blobStorageAccountKey

New-AzStorageContainer -Name images -Context $blobStorageContext
New-AzStorageContainer -Name thumbnails -Permission Container -Context $blobStorageContext

New-AzAppServicePlan -ResourceGroupName myRGroup -Name myAppServiceP -Tier "Free"

创建 Azure Web 应用

New-AzWebApp -ResourceGroupName myRGroup -Name "HarshithaSampleOct" -Location "West US" -AppServicePlan "myAppServiceP"

从 GitHub 存储库获取示例应用

az webapp deployment source config --name HarshithaSampleOct --resource-group myRGroup --branch master --manual-integration --repo-url https://github.com/Azure-Samples/storage-blob-upload-from-webapp

配置网络应用设置

az webapp config appsettings set --name HarshithaSampleOct --resource-group myRGroup --settings AzureStorageConfig__AccountName=$blobStorageAccount AzureStorageConfig__ImageContainer=images AzureStorageConfig__ThumbnailContainer=thumbnails AzureStorageConfig__AccountKey=$blobStorageAccountKey

现在浏览 URL 并上传图像。

Is there a way I can check my web app configuration settings, including viewing the linked storage account?

要检查 Azure 应用程序配置设置,请导航到 Azure 门户 => 您的 Web 应用程序 => 配置 => 应用程序设置 enter image description here

要在 Azure 门户中查看存储帐户,转到您创建的资源组 myRGroup 并单击存储帐户 myblobha

enter image description here

存储帐户 => 容器 => 点击图片,可以看到上传的图片。

enter image description here

关于c# - 检查 Web 应用程序配置设置 - Microsoft Azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74262283/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com