Exploring - C:\MICHAEL\BLOG\ACTIVITY

All Folders

Contents of 'C:\MICHAEL\BLOG\ACTIVITY'

Michael McKenna - Activity

Michael McKenna

Iterating over a resource collection in bicep - avoid BCP144

Being doing a bit of IaC with Bicep recently and I ran into an issue when trying to iterate over a list of provisioned resources. I was trying to create a new resource for each one and I kept getting an error - bicep(BCP144)

Iterating over a list of provisioned resources

I had a scenario where I needed to iterate over a list of provisioned resources and create a new resource for each one. The secnario was I was configuring records on a collection of DNS Zones.

Michael McKenna

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.
Michael McKenna

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.
Michael McKenna

HttpCompletionOption.ResponseHeadersRead

By default the .NET HttpClient will download the entire respones into memory before returning control to the caller. Which means if you’re processing data from the stream, your process won’t start operating on the stream until the entire response has been buffered into memory.

using var feedData = await client.GetAsync(feedUri);
using var reader = XmlReader.Create(await feedData.Content.ReadAsStreamAsync())

The default behaviour makes sense because the response is loaded into memory and the sockets freed up as quickly as possible. That’s probably best for most applications. However for the application I was working on (FeedMD - RSS/Atom to MD feed converter) if there’s no new posts near the top of the feed we decide to stop processing the feed very early on. I wanted to start acting on the stream right away.

Michael McKenna

Remember to have fun on the internet

I want you to know that you too can make new programs which create new fun ways of using computers and using the Internet.


I want you to realize that, if you can imagine a computer doing something, you can program a computer to do that.


Tim Berners-Lee

What a fantastic sentiment. It got me thinking back to my first experiences with the Interent. My first website was a Age of Empires fansite believe it or not. I wish I had a screenshot.

Michael McKenna

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.
Michael McKenna

Goodreads API shutdown

Unfortunately the custodians of my literary history have decided to prevent all new API access in their quest to improve data control.
Michael McKenna

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.
Michael McKenna

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.