Azure Active Directory, the advanced logo

How to fix “AADSTS50011 – The resource principal named was not found in the tenant”

Another day, another variant of AADSTS50011! With a lot of apps and web services using Azure Active Directory for authentication, you’re bound to run into issues, right? Ah well, one would hope to avoid them. But at least this one is usually easy to fix! Problem I’ve encountered 2 different variants of this particular issue – the error message may or may not contain the name of the principal it’s looking for, and the guid of the tenant it’s looking for the principal in. AADSTS500011…Continue reading How to fix “AADSTS50011 – The resource principal named was not found in the tenant”

AADSTS50196 error message

How to fix error AADSTS50196 on Microsoft web properties?

This article explains how to fix error with error code AADSTS50196. This issue usually comes up with an error message somewhat like “The server terminated an operation because it encountered a client request loop.” The error seems to be popping up more and more often. No worries – it wasn’t caused by you! It is, in fact, an unintended side effect of a security hardening feature in some browsers, and some outdated configuration on Microsoft’s end. Obviously, you could run into the issue on other…Continue reading How to fix error AADSTS50196 on Microsoft web properties?

MSDN-related queries in my Google Search Console data. There's quite a few...

The all-important MSDN Subscriber links

This article serves as a simple glossary of important MSDN Subscriber links that I always forget – links that Microsoft keeps updating, that is! I’ll be updating the post as need be :) And yes, I do feel a little bit ridiculous about creating an actual article about something as simple as a list of links to stuff that should be easily discoverable by any search engine. But I suppose it is what it is. Anyway, it seems to me like any time I need…Continue reading The all-important MSDN Subscriber links

"Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels." when trying to upload a picture to WordPress.

Fixing issues with uploading pictures to WordPress Media Library

This article will go through different solutions for fixing issues with uploading pictures to your WordPress Media Library. There’s plenty of reasons that could cause this issue – and a couple of different ways to end up running into it. But fear not! I’ll be proposing a few different ways to fix the issue in your installation. Unlike some of the more aggravated users online suggest, this isn’t likely a bug in WordPress – rather, it’s a configuration / compatibility issue. Luckily, it’s usually something…Continue reading Fixing issues with uploading pictures to WordPress Media Library

Visual Studio logo

How to restore lost windows in Visual Studio?

This article explains how to restore any hidden windows in Visual Studio without resetting your whole window layout, by using a common keyboard shortcut. Problem We’ve all been there – you’re opening a new window in Visual Studio, but your keyboard shortcut or clicking the item in the menu simply seems to do nothing. The window doesn’t show up anywhere. Reason The reason for this (most of the time) is simple: you have the window popped-up and located outside your screen. This happens pretty much…Continue reading How to restore lost windows in Visual Studio?

Worx Landroid L2000 (WR155E) – an honest review

In this article, I’m sharing my perspective and experiences of Worx Landroid L2000 – an autonomous lawn mower I’ve had for about 2 summers now. Hopefully, I’ll be able to help someone else make an informed decision about getting a puppy like this. Anyway – a step back, the 10k-feet view first, as usual. Robot lawn mowers are slowly becoming a commodity, but choosing the right one is still tough. The models are different, the marketing differs, the features and even the behavior of the…Continue reading Worx Landroid L2000 (WR155E) – an honest review

Dependency hell

How to resolve “Microsoft.Data.SqlClient is not supported on this platform.” in an Azure Function App?

Hah – another interesting one. This article describes how to resolve an error along the lines of “Microsoft.Data.SqlClient: Microsoft.Data.SqlClient is not supported on this platform.“, thrown by Azure Functions host. Apparently you can run into this issue either on your local development machine or even in Azure. Problem For me, this error popped up after some house cleaning tasks – dependency updates, merging feature branches… You know the stuff. And suddenly, while the Azure Function App would build and run just fine, my SQL calls…Continue reading How to resolve “Microsoft.Data.SqlClient is not supported on this platform.” in an Azure Function App?

Docker is the unfortunate future

Gotchas when configuring Home Assistant on Docker on Windows

What a nice headline, right? 😅 One day, I thought I’d give Home Assistant a try! And obviously, I couldn’t just make things easy and run it in a Linux virtual machine or my Raspberry Pi – instead, obviously I decided to run it on Windows 10! And obviously, I’d use Docker for it. And of course, not just Docker, but docker-compose. Whatever that is. I don’t know – it’s the first time I’m trying out Docker. Or Home Assistant! Another learning experience coming in,…Continue reading Gotchas when configuring Home Assistant on Docker on Windows

Microsoft Azure logo

Enabling local cache for an Azure App Service

This article explains one easy way for you to improve the performance and uptime of your Azure App Service. I’ll explain a simple but kind-of-hidden and surprisingly badly documented feature – Azure App Service Local Cache, that is – which might make a huge difference. It sure did for me! Since it’s such a no-brainen, I’m kind of half expecting everyone else to already having known about this, but since nobody told me about it, I’m going to document it for future use. Background Let’s…Continue reading Enabling local cache for an Azure App Service

T-SQL, yes please!

How to verify connection to database in Entity Framework Core?

This article explains how to perform a very simple and lightweight database connection test for an existing database context. A while ago, I needed to develop a simple API that I can poll from a load balancer to see whether: An Azure service hosting it is up and It has a connection to its SQL database This simple API would be used for monitoring purposes – simple stuff, sure, but what’s the best way to implement this without causing any unnecessary load to the database,…Continue reading How to verify connection to database in Entity Framework Core?

One does not simply insert explicit IDs in Entity Framework Core

How to resolve “Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert explicit value for identity column in table when IDENTITY_INSERT is set to OFF”

Okay, okay – another super simple thing that I messed up, fixed, and decided to document :) This time I messed up a simple operation in Entity Framework Core operation on a simple entity, and hopefully I’ll save someone else some trouble! Onwards to the issue, then! Problem So when you’re trying to insert stuff into your database – somewhat like shown in the example below: You get an error somewhat like in the example below: Or in text below: Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while…Continue reading How to resolve “Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert explicit value for identity column in table when IDENTITY_INSERT is set to OFF”

Entity Framework Core logo

How to resolve persistent “Build started… Build failed.” when trying to run Entity Framework Core commands?

This time, I’m happy to present you perhaps the simplest way of fixing an annoying and persistent issue with a misleading error message! Wait, does that sound familiar? It’s almost like that’s what half of my articles are about… Anyway, I was happily going my way about creating a couple of new fields to an entity and then scaffolding my changes to a new migration using Entity Framework Core’s Add-Migration, but this happened: Build started… Build failed. “Oh”, I thought. “I must have messed something…Continue reading How to resolve persistent “Build started… Build failed.” when trying to run Entity Framework Core commands?

SharePoint Home Sites – a Game Changer?

This topic seems to be on everyone’s mind right now: SharePoint Home Sites. They’re finally rolling out (again). Or maybe even rolled out, in case this article ends up late in my publishing queue! But what are they? How do you create SharePoint Home sites? How do you best use them in your organization? To take a step back, let’s first take a step upwards – to get the 1000-feet view! Getting the big picture – why is Microsoft doing this stuff in the first…Continue reading SharePoint Home Sites – a Game Changer?

WHAT IN TARNATION EF CORE?

How to resolve another “An error occurred while updating the entries” exception in Entity Framework Core

This article offers yet another possible fix to an issue, where trying to call SaveChanges() in Entity Framework Core throws a pretty generic “An error occurred while updating the entries”-exception, and you’re left wondering what in tarnation is wrong this time. And admittedly, that’s a really generic error, so it could be pretty much whatever. But in this article, I’ll go through one possibility – hopefully it helps! Problem So I was just pushing in some new rows to an incredibly simple table in my…Continue reading How to resolve another “An error occurred while updating the entries” exception in Entity Framework Core

Azure Active Directory (Azure AD)

How to find out the Directory ID of your Azure AD tenant?

This article explains in extremely short way, how to fetch your Azure Active Directory tenant’s Directory ID. Let’s make it short and sweet, because quite frankly, it is really simple! Solution Option 1: Use whatismytenantid.com for finding your tenant/directory id: Quick solution – works (at least) for all standard tenants: Navigate to https://www.whatismytenantid.com/ Enter the domain associated with your Azure AD instance (often like contoso.onmicrosoft.com) Let ShareGate do their magic and find your tenant/directory id for you! Thanks to Thomas Vochten for pointing this out…Continue reading How to find out the Directory ID of your Azure AD tenant?

Azure Functions runtime throws an "Insufficient memory to continue the execution of the program." error. What do?

How to resolve error “Insufficient memory to continue the execution of the program.” when debugging Azure Functions locally?

This article describes a solution to an error “Insufficient memory to continue the execution of the program.” I was debugging an Azure Function locally and ran into it – it stopped my Azure Function from starting at all. So, this is what I got: Insufficient memory to continue the execution of the program. Ohh… kay..? My development machines have plenty of RAM, surely enough to run an Azure Function! So what gives? How to resolve the error? Okay, okay. So it’s actually super simple and…Continue reading How to resolve error “Insufficient memory to continue the execution of the program.” when debugging Azure Functions locally?

One does not simply use just one DbContext with multiple ConnectionStrings in Entity Framework Core.

How to implement multiple Connection Strings for one DbContext in EF Core?

Recently, while building an app service to host a .NET Core API, I had to implement the logic for using both Read-Only and Read-Write Database Contexts for Entity Framework Core. In this particular case, it was the same database – just different contexts, because depending on the location of the app service the app was deployed in, read and write operations might actually go to different database instances, That’s really easy, right? Well… Yes and no. Essentially, it’s easy to spin up, but comes with…Continue reading How to implement multiple Connection Strings for one DbContext in EF Core?

Microsoft SQL Server logo

How to clean up duplicates from MS SQL Database?

This article explains how to query and remove duplicate entries from a Microsoft SQL database using T-SQL. The same model works both for Azure Databases (in Azure SQL Query Editor) and databases on MS SQL Server (using SSMS – SQL Server Management Studio). I had to do this a while back due to a bug in an API creating multiple entities with the same content – save for the Identity field. Fun! Background Why bother? That’s a (somewhat) valid question. A table in a SQL…Continue reading How to clean up duplicates from MS SQL Database?

AppInsights logo

How to fix weird “Production Breakpoints” errors in an Azure App Service?

This article describes a curious fix I found to an issue where Application Insights (seemingly) crashes your Azure App Service, leaving behind interesting and non-descriptive errors in the Application Event Logs. Problem Does your Application Insights look like this, too? Event logs full of “Production Breakpoints” with weird errors about named pipes? In my case, the errors were something like these below: IfFailRet(pNamedPipe->Read((BYTE*)&controlRequest, sizeof(SnapshotHolderControlStruct))) failed in function CSnapshotHolder::HandleNewPipeConnection: -2147024787 And: CNamedPipe::Read – Read from named pipe failed: 0x8007006D. These errors would always pop up at…Continue reading How to fix weird “Production Breakpoints” errors in an Azure App Service?

C# & .NET

How to get the EF Core Connection String?

A while ago, I had a situation where a DbContext was misbehaving after deployed to an Azure App Service, and I needed to check the connection string it’s using directly in the code. I had reason to think my code was grabbing an outdated connection string and using a wrong database – and as you can probably imagine, that could cause some issues! However, finding the right method actually took me googling, as there were plenty of examples for Entity Framework for .NET Framework, but…Continue reading How to get the EF Core Connection String?