In this lab, you will gain experience using C# and Visual Studio to connect to and use Blob storage.
You will RDP into a Windows VM set up with Visual Studio and update a pre-built solution with the appropriate Blob storage C# code to connect to Blob storage, upload a blob, and retrieve the blob. Finally, you will run a console application to see everything working.
Upon completing the lab, you will have gained the experience required to work with Blob storage using C#.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- RDP into the VM and open the Visual Studio solution.
RDP login:
UserName : "azureuser" Password : "LA!2018!Lab"
PowerShell to run:
Add-Type -Path "C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.5System.IO.Compression.FileSystem.dll" $url = "https://github.com/linuxacademy/content-azure-labs/blob/master/zips/Azure-LearningActivity-Blob.zip?raw=true" $zipfile = "C:UsersazureuserDesktopAzure-LearningActivity-Blob.zip" $folder = "C:UsersazureuserDesktop" [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest -UseBasicParsing -OutFile $zipfile $url [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $folder) Remove-Item -Path $zipfile
- Update Visual Studio solution and run the console app.
In this step, we’ll update our Visual Studio solution with the appropriate C# code to connect to, and interact with, the Blob service.
When we’re finished, we’ll run our completed console app, save and retrieve blobs, and verify the data was saved through the Azure portal.