Azure Key Vault logo

How to update from deprecated Microsoft.Azure.Services.AppAuthentication to new and shiny Azure.Security.KeyVaults.Secrets?

So, a while ago I posted about a fairly simple way to write your code for fetching secrets (and other confidential stuff) from Azure Key Vault in such a way, that it would work the same way both in Azure and on your local dev box. I find this pretty important, as it reduces the need for weird workarounds and fallbacks in your code, and at the same time enables…Continue reading How to update from deprecated Microsoft.Azure.Services.AppAuthentication to new and shiny Azure.Security.KeyVaults.Secrets?

Build successful? SHIP IT!

Fixing Blazor WebAssembly .NET 6 MSAL authorization bug

Let’s make this short and sweet. In this particular case, upgrading a Blazor WASM solution to .NET 6 broke the authentication when deployed to Azure. The same issue could probably happen to a fresh project, though. This is what you’re running into: If you open your browser console, you’ll see 2 interesting errors – first: dotnet.6.0.0.o2we6pverp.js:1 mono_wasm_runtime_ready login.microsoftonline.com/common/oauth2/v2.0/token:1 Failed to load resource: the server responded with a status of 400…Continue reading Fixing Blazor WebAssembly .NET 6 MSAL authorization bug

Azure Functions CLI - such a pretty logo for such an awesome functionality

How to fix “Unable to cast object of type ‘System.Net.Http.HttpRequestMessage’ to type ‘Microsoft.AspNetCore.Http.HttpRequest’.”

This article explains how to fix an issue where your Azure Functions function (yes, that’s a capital F and a lowercase f to denote the difference between the product and the piece of compute) fails to fire when a POST request comes in, even though it’s configured to do so, and instead throws a somewhat confusing error message about HttpRequestMessage not being castable to HttpRequest – even though you KNOW…Continue reading How to fix “Unable to cast object of type ‘System.Net.Http.HttpRequestMessage’ to type ‘Microsoft.AspNetCore.Http.HttpRequest’.”