Understanding the Newtonsoft JSON Token

One of the concepts worth understanding when writing a custom converter for the popular Newtonsoft JSON framework is that of the JsonToken, and the role it plays in helping you understand the JSON being read. The JsonToken documentation for Newtonsoft is relatively sparse - in part because once you understand it, it’s a relatively simple concept. Effectively, when you’re attempting to deserialise a string representation of a JSON object, such as in the ReadJson method of a custom JsonConverter, the JsonToken represents each element or component (token if you prefer) of the object as it’s deserialised....

March 26, 2019 · 2 min

Which Azure Functions runtime am I using?

Microsoft currently support two versions of the Azure Functions runtime - version 1 and version 2. This post will look at the main changes between the two versions, and show you how you can check which runtime you’re using. What are the key differences between versions? Version 1 of the runtime was introduced back in 2016, when functions were first announced. At launch it supported JavaScript, C#, Python and PHP....

March 25, 2019 · 2 min

Azure Functions App vs Functions

A common question asked by newcomers to the world of Azure Functions, is what’s the difference between an Azure functions app vs a function? Are they the same thing? In short, there is a difference. You can think of the f_unctions app_ as if it refers to a workspace that contains one or more functions. It’s essentially a wrapper (or in .NET terms, project), holding all your Azure functions in one place and allowing for easy deployment and management of them as one....

March 24, 2019 · 1 min

What's an Azure Service Principal and Managed Identity?

In this post, we’ll take a brief look at the difference between an Azure service principal and a managed identity (formerly referred to as a Managed Service Identity or MSI). Dive deeper into Azure AD service principals and managed identities in our new detailed ebook about Azure AD What is a service principal or managed service identity? Lets get the basics out of the way first. In short, a service principal can be defined as:...

March 22, 2019 · 2 min

Using key vault values from variable groups in Azure DevOps pipeline tasks

Earlier this week we had a post about how you can easily access secrets stored within Azure Key Vault in an Azure DevOps pipeline task, using the Key Vault Task. One other way you can achieve this same functionality is by using a variable group, and in this post we’re going to show you how. Why would you use a variable group instead of the key vault task? If you know you require access to the secrets from across multiple stages within a pipeline using a group allows you to easily manage access without having to include the task in every single stage by scoping the group to the release or specific stages....

March 21, 2019 · 2 min

Throw or throw ex in C#?

One common question that comes up when working with exceptions in C#, is whether or not you should re-throw an existing exception by specifying the exception, or just using the throw keyword where an error occurs. In most cases, it’s best to rethrow the existing exception, such as below: 1 try { var networkResponse = await someNetworkService.GetAllPosts();}catch (Exception ex){ Log.Warning("An exception occurred", ex); //Now lets rethrow this same exception throw;} By doing so, you ensure that the original stack trace for the exception is maintained....

March 20, 2019 · 1 min

Accessing Key Vault secrets in an Azure DevOps pipeline task

In the post, we’ll take a look at one option for accessing Azure Key Vault secrets from within an Azure DevOps release pipeline. Want to secure your Azure DevOps application secrets in Key Vault? Find out how in our short e-book guide on Amazon Setting up your Azure Key Vault Before you can add the secret to your pipeline, you first need to make sure that there’s a key vault setup in Azure, and that you have given either your pipeline managed service identity or account GET access to the secrets within the vault....

March 19, 2019 · 3 min

How to add Application Insights to an Azure function

Today we’re going to look at how easy it is to add Azure Application Insights (part of Azure Monitor) to an Azure Function. What is Application Insights? In short, Application Insights is a performance and monitoring tool that forms part of the Azure Monitor suite. It allows you to access detailed telemetry on requests made to your function, while observing real-time performance and failures. It works across App Service apps, Azure Functions and more - practically anywhere you can install the available App Insights SDKs....

March 18, 2019 · 3 min

Create an Azure Function App using a Mac

In this post, we’ll take a look at how you can quickly create an Azure Function when using a Mac. In particular, we’ll be using the Azure Functions command line tools to create our functions app. Getting started Before you can create a function, you’ll need to install the Azure Function command line tools. But before you can continue, you need to make sure that you have installed Brew. If you’re not familiar with it, Brew is a package manager for the Mac - similar to NPM for Node....

March 14, 2019 · 3 min

What's the difference between an Azure Service Bus queue and topic?

Starting out with an Azure Service Bus? It can be confusing trying to work out whether you should use a queue or a topic. In this post, we’ll try to break down the difference between the two and which one you should use when. What is a service bus queue or topic? When configuring a service bus, you have two options for configuring how messages are processed - a queue, or a topic....

March 13, 2019 · 3 min