cdrx

Securing Configuration with Key Vault

In my previous post (here), I talked about the need to consider security when you build your application and focused mainly on securing network traffic. In keeping with a focus on DevOps, we took an Infrastructure as Code (IaC) approach which used Terraform to represent infrastructure in a script. But, as someone point out to me privately, I only covered a part of security, and not even the bit which generally leads to more security...

briancaos.wordpress.com briancaos.wordpress.com

C# Remove Duplicates from List with LINQ

C# LINQ do have a Distinct() method that works on simple types: // An string with non-unique elements string s = "a|b|c|d|a"; // Split the list and take the distinctive elements var distinctList = s.Split('|').Distinct().ToArray(); // Re-join the list var distinctString = string.Join("|", distinctList); // Output will be: "a|b|c|d" Console.WriteLine(distinctString); For non-simple types, you have 2...

briancaos.wordpress.com briancaos.wordpress.com

Read and Write blob file from Microsoft Azure Storage with .NET Core

The documentation on the Azure Storage Blobs are a little fuzzy, as the NuGet packages and the approach have changed over time. The latest NuGet Package is now called: Azure.Storage.Blobs The concept of blob storages are the same though: You use a connectionstring to connect to an Azure Storage Account.Blob storage is divided into containers. To access a container you need a BlobContainerClient.To access a blob you get a BlobClient...