DP -200: Connect a console app to Azure Storage using Visual Studio Code and c# - code on Github

Опубликовано: 02 Октябрь 2024
на канале: Cloud Security Training & Consulting
1,439
14

DP -200: Connect an console app to Azure Storage using Visual Studio Code and c# - code on Github

Create a new Azure storage account using the Azure portal.
Create a new application and connect the app to an Azure Storage account.
reference:
Guide: https://github.com/cloudsecuritylabs/...


further study: https://docs.microsoft.com/en-us/lear...


//creare a new app
dotnet new console --name PhotoSharingApp
cd PhotoSharingApp
dotnet run

//create a resource group and a storage account
az group create --name test_RG -l eastus
az storage account create --name "teststore112" --resource-group test_RG --sku Standard_LRS

//get the storage client library
dotnet add package Azure.Storage.Blobs
dotnet run

//Connect storage account
Access key
REST API endpoint
- configure connection strings

// create appsettings.json
touch appsettings.json




Go to GITHUB page for the rest of the code or download the full file.
Note: storage account does not exist any more.
DO NOT UPLOAD code on github with access keys.