ASP.NET Core correct usage of ConfigureAwait with async/await

Lately we had a discussion on when to use ConfigureAwait(true) or ConfigureAwait(false) in ASP.NET Core 2. In the end most of the team, including me, had a faulty assumption on how to do this in ASP.NET Core. In this case ASP.NET Core is different from ASP.NET. Good to know if you have to decide on what to use in ASP.NET core.

Continue reading “ASP.NET Core correct usage of ConfigureAwait with async/await”

Advertisements

Cross process Application Insights with Multi-Role Application Map

Use Multi-Role Application Map to monitor cross process dependencies

When using Application Insights to monitor your Microservices environment, it would be nice to track calls over process boundaries. Application Insights has a preview for Multi-Role Application Maps. This enables you to visualize the dependencies over multiple processes and name the different processes. In this blog posts I will explain how to enable Multi Role Application Maps preview, give you different process names and add dependency tracking into your application. Continue reading “Cross process Application Insights with Multi-Role Application Map”

#TechdaysNL 2017 Best Practices ARM Templates

On October 12 2017 I did session on Best Practices ARM Templates at Microsoft TechdaysNL. The presentation shows some best practices we learned while using ARM templates. Download the pdf:

Best_Practices_ARM_Templates_TechDays2017

When I have the recordings of the presentation, I’ll add them to this post.

Thanks to the 160 enthusiast who where there.

#TechdaysNL 2017 Pester session

VSTS Marketplace Pester task hereOn October 13 2017 I did session on start testing with Pester at Microsoft TechdaysNL. The presentation gives a howto start with testing with Pester, simple Pester syntax, start testing functions and infrastructure testing. Download the pdf:

Pester_TechDays2017.pdf

You can find the VSTS Marketplace Pester task here

When I have the recordings of the presentation, I’ll add them to this post.

Thanks to the 80 enthusiast who were there. I really enjoyed your enthusiasm.

Implement Pessimistic Concurrency in Entity Framework Core

ConcurrencyIn a scenario where we were using SQL server as a queue, before publishing events to external queues, we wanted the data to be processed only once and in order, even with multiple processors for failover. When reading from the table we wanted to lock the records and block other processors from reading those records, while being processed. This is called Pessimistic Concurrency, unfortunately Entity Framework Core does not support this out of the box. To realize Pessimistic Concurrency you need to write your own SQL queries directly on the database (The solution is database type bound, in this case Microsoft SQL server). This blog post will show how it can be accomplished.
Continue reading “Implement Pessimistic Concurrency in Entity Framework Core”

Test Azure deployments in your VSTS Release Pipeline

pesterWhen deploying Azure Resources you want to know if all resources are deployed as expected. To check if the resources are correctly deployed you can open the portal and visually inspect the deployed recourses or you can also run some powershell to validate the resources. Why not automate these checks and add them to your deployment pipeline. To validate the resources, I extended the Pester Build Task to connect to Azure. A test that checks the deployment of a VM can look like:

Continue reading “Test Azure deployments in your VSTS Release Pipeline”

Log4Net Troubleshooting

logoLog4net is a fail-stop logging system. Fail stop means that it stops logging on an internal exception and by design does not interact with the program flow. Knowing this explains you troubleshooting log4net isn’t so easy. If logging fails, your program does not notice. You see a lot of questions about: why is my log4net logging not working? This article explains the basic troubleshooting and most common solutions.

Continue reading “Log4Net Troubleshooting”