Configuring our Service to Access Azure Storage

Essentially, this needs to represent a connection string to the storage account. You can easily find the correct value for this in the Azure portal, under Access keys:

We could simply copy this and paste it directly into the code by assigning the _connectionString variable to it. However, instead, we're going to use ConfigurationBuilder. Before we can make a start on this, we'll need some NuGet packages:

Install-Package Microsoft.Extensions.Configuration -ProjectName PhotoStorage.WindowsServiceInstall-Package Microsoft.Extensions.Configuration.Json -ProjectName PhotoStorage.WindowsService

This ...

Get C# 8 and .NET Core 3 Projects Using Azure - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.