Skip to content

Archive for 2020

  • Azure App Services make it quite easy for you to add one or more authentication providers to your application. But how do you add Azure AD as a provider using Infrastructure as Code? In this article I will show you the steps of deploying and securing an Azure App Service with AAD authentication using an Azure pipeline.
  • A lot of people prefer to manage their infrastructure as code. Some infrastructures might require an App Registration in an Azure AD. So, why would we not apply the IaC practice here as well? An Azure pipeline might stop you, stating “Insufficient privileges to complete the operation”. So, this is not possible, or is it? In this article I will show you how to make an Azure pipeline in charge of apps in your Azure AD.
  • I had the honor to be a guest at the dotnetFlix channel, hosted by Sander Molenkamp and Edwin van Wijk. I share more on the techniques, frameworks and libraries I have used and I finish with a demonstration of the finished application. As there was so much to share, it did not fit in a single episode, so we recorded three parts!
  • A couple of my recent articles were about machine learning and image classification in C#. These posts were the results of a pet project on which I was working. I will be speaking about this project at a couple of events in the coming weeks.
  • Recently I wrote an article about getting all prediction scores from your ML.NET model. So, when we want to do this for an ONNX model we have loaded with ML.NET, that should work the same, right? Not really. Depending on the version of ML.NET, the data types of the downloaded Azure Custom Vision ONNX model are very hard to map on the .NET data types we use. In this article I will show how we can get the labels and scores from an ONNX model prediction in C#.
  • When predicting with an ML.NET model you trained yourself, you might be interested in just more than the highest scoring label. But how do you get the other labels and their corresponding scores? In this article I will show how to you can get these values.
  • YAML is a data serialization standard that is intended to be human friendly. For example, it reduces the use of delimiters quite drastically compared to other formats like JSON. Some YAML file authors might push the boundary for readability even further by having a property where the value can be a sequence with zero or more values, or just a scalar if there is only a single value. Reducing the number of delimiters someone has to read or write even further. How can this work with C#, a strongly typed language?
  • When you have created a machine learning model, you will retrain that model when new data is available. But when I recently added a couple of images to the training set of my own ML.net model, I was faced with the following exception: System.InvalidOperationException: 'The asynchronous operation has not completed.' The application did work for weeks, so what has changed? And more importantly, how to fix this situation?
  • When using a Docker Registry, like hub.docker.com, you will not often want to delete a published version of an image. You cannot know if someone, somewhere in the world is using that specific version. But when using a repository as part of your CI/CD pipeline, you might have lots of versions that are not used by anyone anymore. So, what if you want to clean the repository automatically? In this article, I will show how the delete images by tag, using PowerShell and the Docker Registry HTTP API V2.
  • I use the MSTest Parser task in a Bamboo build plan to add a report of tests that were executed and their outcome. But sometimes you want to skip running tests. For example, you are focusing on other changes in your CI/CD pipeline and want to keep the feedback loop as short as possible. The problem is, if you don't run any tests, the parser task will fail. There are no configuration settings to influence this behavior or to disable the task conditionally. I could disable the task manually, but that would affect all other branches at the same time. So, I found it was time to create a quick work around.
  • The Custom Vision service is one of the Azure Cognitive Services that is provided by Microsoft. With custom vision, you can train a model with your own image data. The portal provides a Prediction API for the trained model to classify an image you supply. There can be reasons why you might not want to use the online REST endpoint and you could prefer an offline model. To work with machine learning in .NET, we can use ML.NET. There are several tutorials how to use this framework. But none of them combine the use of the Bitmap class with a downloaded ONNX model from the custom vision portal. In this article I will walk through the steps to set up an application to classify bitmaps using a custom vision model with ML.NET.
  • When trying to have an application work with an ONNX model I downloaded from the Microsoft Custom Vision portal, I got the following exception: TypeInitializationException: EntryPointNotFoundException: Unable to find an entry point named 'OrtGetApiBase' in DLL 'onnxruntime'. Searching for the error online did not yield any solutions. After solving the problem, I wanted to share the solution for anyone else running into the same exception.
  • Recently, I was using a YAML file for storing some data for a pet project. To work with this YAML in a .NET application, I use the excellent YamlDotNet library by Antoine Aubry. One of my properties was a URL. Deserializing went fine, but when serializing back to a YAML file, things were not going as intended. In this short article, I will explain how I did fix this.
  • Using Docker images for your Azure web app is not brand-new functionality. But if you want to deploy your container-based web app using ARM templates and use your own Azure container registry, you might discover it's not as straightforward as you might think. In this article we will walk through the steps how we can make a connection to the container registry. In the end we will also make sure we do not have to pass along the password during the deployment.
  • These times should not prevent us from sharing knowledge and keep learning about great new technologies. For this, Info Support organized the lockdown lectures. I was honored to take part in this series and have people learn about the Open Application Model (OAM) and the Distributed Application Runtime (Dapr). Here I share with you the recording and slides.
  • When working with ARM Templates, chances are you have set a value that was a Storage Account Connection String. For example as the value of an appsetting, or as a secret in Azure Key Vault, which I did as an example in a previous blog post. However, this does not result in the most maintainable and readable piece of JSON. Even worse if you have multiple connection strings in the same template. In this article I will show that adding a User-Defined Function to our template can improve on this.