Dockerfile for AMD64

It is now commonplace to have ARM64 chips (M-series on Mac, Copilot PC, etc.) but still often necessary to build a .NET container that will run in AMD64.

Read More

gRPC in Container Apps

gRPC requires HTTP/2. Container Apps have a transport setting that defaults to “auto” which should detect HTTP/1 or HTTP/2. However, seemingly this doesn’t work with gRPC so you must set it to HTTP/2 manually in the ingress section.

Read More

Conversational Context for Chat Bots

I have had a number of conversations lately about what “context” means for a chat bot. In this article, I will document some of my thoughts on improving the conversational experience with better context. By context, I mean the information that is provided to the chat bot to help shape and ground the response.

Read More

Use-Cases for Event Hub

Our team was working on a project recently where Azure Event Hub was used in several different ways. We wanted to share these different use-cases and how we used Event Hubs to address those requirements.

Read More

Soft Delete in SQL Server MERGE

Recently I needed to handle create, edit, and delete via a SQL MERGE but the delete was a soft delete. While this is not a problem in some SQL implementations, SQL Server only allows for conditional match statements that support a single UPDATE clause.

Read More

Handle Exceptions Middleware

There are many places in an aspnetcore solution that could throw an exception that might not be the appropriate exception to pass on to callers. In addition, there might be cases were we need to mutate the response that would have gone to users in middleware before those responses are sent. For example:

Read More

Front End API

This document discusses a pattern whereby a collection of microservice APIs are only accessible via a private network and thus all external clients must contact a single frontend API which acts as a gateway to those private services. The role of this frontend API includes:

Read More

AspNetCore Custom Auth

The purpose of authentication (authN) is to verify that someone or something is who or what they claim to be. The purpose of authorization (authZ) is to determine whether a user or service has been granted a certain level of access.

Read More

API Versioning

This document will describe the typical approach to versioning an API and why that might not be the best approach (particularly for microservices) while offering an alternative.

Read More

Implicit Operators

Implicit Operators in C# allow a class to implicitly convert to another class or type. In the example below, we can take a string like “local/TPALARM_v3” and cast it as an AlarmDesignation. This then gives us the ability to use all of our methods defined on this class.

Read More

FromBody Formatters for AspNetCore

The [FromBody] property decorator for aspnetcore allows you to deserialize JSON bodies and other types of messages. However, this is extensible to support other types of bodies, including this example of a plain text deserializer…

Read More

AAD Token via cURL

Someone sent me some code this week on using CURL to get an access token via Azure AD. The format is definately useful so I have included it here.

Read More

Azure Load Balancer Traffic

There are a number of ways to load balance a workload in Azure (2x layer-4 LBs and 1x layer-7 LB for 1st party load balancers). However, it turns out there are some interesting cavaets about how you can access the frontends and/or spread your backends across networks. I made this chart to help:

Read More

Create an Azure Automation Connection to Another Directory

My customer is a software ISV that deploys solutions for their customers in Azure. The customers have their own Azure AD directories that contain Applications and the ISV wants to know when those expire. They wrote a PowerShell script to run in Azure Automation that connected to Azure AD like this…

Read More

My Node.js Best Practices

My preferred development language is Node.js. Recently I have been doing a number of projects with other folks and it becomes beneficial to standardize on some best practices. This is by no means exhaustive, but it an attempt to write down some of the practices I prefer to use.

Read More