Blog

I’ve always wanted to have a blog; this is where I write about my adventures of the technical kind. Mostly.

2024

Debouncing input change event in Vue 3; wait until user stops typing

Ever needed to create an auto-complete that’s powered by an auto-complete API, or have a search field you want to automatically run without forcing the user to hit enter? Use this technique to avoid excessive traffic to your endpoints.

Multi-tenancy in ASP.NET Core 8 - Tenant Specific Options

In this post we will configure options on a per-tenant basis using the Options Pattern.

Multi-tenancy in ASP.NET Core 8 - Dependency Injection & Tenant Specific Services

In this post we look at how to have tenant specific services in a multi-tenant application in ASP.NET Core 8.

The One Billion Row Challenge in .NET

I just saw the one billion row challenge. I’m a bit late as the challenge was back in January but I thought it would be a fun exercise to try and solve it in .NET.

Multi-tenancy in ASP.NET Core 8 - Tenant Resolution

Can you believe it, just like that it’s been 4 and a half years since I wrote my initial series on multi-tenancy in ASP.NET and now ASP.NET Core 8 is out. In this post I revisit multi-tenancy in ASP.NET Core and take a fresh look at how I’d implement multi-tenancy today.

2023

IndieAuth in ASP.NET

This is a long form blog post about how I added support for IndieAuth as an authentication method for a .NET 6 application.

Adding snake_case support to System.Text.Json

It’s not supported out of the box (yet) despite being quite popular (e.g. GitHub API) but it’s super simple to add if you need it.

How to upload a file to a GitHub release in a workflow

Spoiler alert: you don’t need an Action contributed by a third party.

Automated versioning and publishing of a SDK-style NuGet packages using GitHub Actions

In this article we look at the method of automating the NuGet packaging process using GitHub Actions that we used for GuidOne.

Upgrading to .NET 6 and Entity Framework table data annotation schema not working

After upgrading a .NET 3.1 ASP.NET Web Application to .NET 6 and Entity Framework from 3.1.1 to 7.0.8 the schema applied using the table data annotation was no longer respected

Automated versioning and publishing of a Non-SDK-style NuGet packages using GitHub Actions

In this article we look at the method of automating the NuGet packaging process using GitHub Actions that we used for JsonPatch.

Peripheral: The great blog refresh of 2023

This blog just turned 10! It’s a strange milestone; so inconsequnetial for everyone in the world bar me. Instead of going down a rabbit hole of irrelevance a better use of my time is to give this blog yet another refresh.

Linking to the latest commit in the header of your Hugo site on GitHub

.GitInfo is linked to the current page, this is how we accessed the lastest commit information at build

Host your Hugo Generated site on GitHub

GitHub Pages are are a great way to host a blog, share your résumé, or even host a website about one of your projects.

2020

JSON Patch Support with Swagger and ASP.NET Core 3.1

Generate the correct request schema for Patch operations in ASP.NET Core 3.1 which use JsonPatchDocument

2019

Migrating multi-tenancy to .NET Core 3.1 (LTS)

.NET Core 3.1 is out and it’s a LTS release. Our 4 part multi-tenancy series is already out of date! Here we’ll cover off the breaking changes and the updates we need to make.

Creating a multi-tenant .NET Core Application - Tenant specific authentication

This time we are looking at how we can configure authentication on a per-tenant basis.

Creating a multi-tenant .NET Core Application - Tenant specific options

This time we are looking at how we can configure options on a per-tenant basis any third party service that supports the Options Pattern.

Creating a multi-tenant .NET Core Application - Tenant containers

This time we are looking at how we can configure services on a per-tenant basis which allows us to resolve a different service based on which tenant is active. An application isn’t truly multi-tenant unless you can have a different services container for each tenant.

Creating a multi-tenant .NET Core Application - Tenant resolution

This series of blog posts is an exploration of how to achieve multi-tenancy in an ASP.NET Core web application. In this part of the series we resolve a request to a tenant and introduce the ability to access information about that tenant.

Host your Hugo site on Azure Storage

Host your Hugo SSG using Azure Storage and KeyCDN.

2016

Using Azure Functions to text you when your servers are down

The thing I like most about it is that it’s serverless so no infrastructure to maintain and worry about.

Update multiple Git repositories on Windows at once using Powershell

Let’s write the script - it’s super simple. It’s designed to be placed in the parent folder of your Git repositories.

How to import Python extension modules in Azure Functions

I just needed to quickly run a few Python methods… in Azure

Optional arguments in C# interfaces

In the interest of code-safety I don’t put default values on implementing classes any more.

Running Go on Azure App Services

It turns out Azure App Services have added native Go support.

Getting started with Go on Windows

I’m giving this Go-lang thing a whirl, turns out it’s dead easy to set up on Windows.

Func<T> vs. Expression<Func<T>> in LINQ

Don’t worry if you haven’t noticed the differences, you call them with the exact same syntax.

GUIDs Part 3: GUID one

Then to make it all stick I implemented the spec

Sorting IQueryables using strings and reflection

Wouldn’t it be great to be able to specify the property to order on at runtime for a LINQ query?

Reactive Extensions .NET: Implementing the circuit breaker pattern

We create an observable that either emits values from the source or the alternate source based on the status of the circuit breaker.

GUIDs part 2: GUID as gold

How are GUIDs unique with out a central watch dog?

Generating an Apple Push Notification Certificate on Windows

Following most instructions Apple seemed to think my IIS generated CSR was invalud.

GUIDs part 1: What the GUID?

I asked myself some questions and ended up learning a lot about the humble GUID - they really are quite cool.

2015

Improving conversion rates in KickSmoking

People won’t give you money if you treat them poorly.

Monetising KickSmoking

Despite being on the back-burner it’s still the number one quit smoking app on the Windows Phone app store.

2014

Migrating an Azure VM to a different region

Even though you can’t do it from the online interface it, it’s actually pretty simple.

Setting up a Jekyll workflow on windows

For sites that are read heavy but get updated quite infrequently (like a blog, or marketing site) a static site is ideal.

How to add JSON Patch support to ASP.NET Web API

We’re going to create a formatter that understands JSON Patch.

Should I use www or not?

Is it still required? Or can we just use the “naked” domain?

Setting up an elasticsearch cluster in azure

In this blog post we’ll investigate how to set up an elasticsearch cluster on Windows Azure.

The great confusion about HTTP Patch

It’s designed to allow an API to support partial updates.

Dependency injection for ASP.NET Web API action filters in 3 easy steps

This post looks at performing dependency injection on a WebAPI ActionFilter using Unity.

Automatically marking required labels in ASP.NET MVC

I don’t want to re-implement the label HTML helper but I would like a way to inspect the model and update the label text based on the presence of the [Required] attribute.

Implementing XML-RPC services in ASP.NET MVC

We’ll look at how we implemented XML-RPC services in ASP.NET MVC by creating a custom model binder.

2013

You probably don't want your development team to share a single database

If you’re currently working on a project where all developers are using the same centralized development database, then chances are that’s the way the project has been run since the beginning.

The back button and browser caching

If the user navigated away then used the back button they would be shown the original page with the original data. They’d then think the fancy JavaScript was completely broken.

Error handling in ASP.NET MVC Part 2: Our implementation

A simple exception handling strategy that enables detailed logging in MVC context but also provides support for general ASP.NET errors such as page not found exceptions.

Error handling in ASP.NET MVC Part 1: Our options

This is the first post in a two part series, in this part we will look at the options available to us in ASP.NET MVC for Error Handling.

Simple pluralisation in ASP.NET MVC

If you don’t bother with correct pluralisation your users will be less likely to appreciate the care you put into the rest of your application.

Single sign out with Azure ACS

ACS may not directly support single sign out but you can easily log the user out of their identity provider as well as your website using this technique.