This category mostly contains hacks and workarounds that are definitely not needed, recommended, or even safe in production environments. So, beware – don’t apply or run these against your production at all. These should be limited to the development environment only.
Okay – another one of the topics that I’m explaining probably more to myself than whoever’s reading this later. But that’s why I write this blog, so please bear with me. 🙂 Anyway, onto the actual issue at hand! I was configuring Docker on WSL on my Windows laptop for development purposes. That’s supposed to be easy – install WSL, install a distribution, install Docker, switch it to using WSL, fire up your WSL command prompt and run any Docker commands there (or deploy from…Continue reading Upgrade from WSL 1 to WSL 2 in Windows 10 to fix Docker
Another one in the series of “random things that break when you try to run Docker on Windows”! I was just minding my own business, trying to run an Azure IoT Edge custom module – a Docker container, really – locally, when suddenly everything broke and one of my Docker containers wouldn’t run anymore, which broke the rest of my stuff pretty badly. Instead, it failed with a cryptic and surprising error “exec user process caused: no such file or directory”. So, let’s take a…Continue reading How to fix “exec user process caused: no such file or directory” in Docker on Windows?
This was another (luckily pretty shallow) rabbit hole down some corporate IT and weird default configurations by our favorite tech-daddy Microsoft. In the article, I will describe one possible reason for a process called Vmmem.exe consuming enough RAM to crash pretty much everything else running on your machine. But let’s take a step back first – what happened? Problem I was developing some Azure IoT Edge modules (as one does), when my dev laptop was starting to feel a bit sluggish. That’s nothing out of…Continue reading How to solve Vmmem consuming ungodly amounts of RAM when running Docker on WSL?
Another fun one with Azure Functions! At least it’s a simple one: this time, I ran into a weird issue while doing some code reusing – well, copy-pasting – between a couple of different projects. I was lovingly hand-crafting some Azure Functions, while suddenly the Azure Functions host would throw this in ugly red letters: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: ‘Microsoft.AspNetCore.Mvc.Core, Version=188.8.131.52, Culture=neutral, PublicKeyToken=adb9793829ddae60’ at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters) at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name) at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name) at Mono.Cecil.MetadataResolver.Resolve(TypeReference type) at Mono.Cecil.ModuleDefinition.Resolve(TypeReference type) at Mono.Cecil.TypeReference.Resolve() at MakeFunctionJson.AttributeExtensions.IsWebJobsAttribute(CustomAttribute…Continue reading Azure Function build fails with “Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: Microsoft.AspNetCore.Mvc.Core”
Ah – this was a fun one. I needed to figure out how to purge, flush and clear your commit history on GitHub. Turns out it isn’t as easy as clicking a button in the web user interface – the world is apparently not ready yet! 😁 Luckily, it wasn’t that complicated either – and the steps should work for other flavors of git as well. Background Always remember to .gitignore your secrets, folks! And if you forget, pray you’re not committing to a public…Continue reading How to nuke your Git(Hub) commit history?
This article explains another fun issue that you might run into when developing Azure Functions in your local environment. It was weird how unclear the few results were that I could find. And the issue is just… very hazy in general. But I was able to track the issue down, and thought I’d document the solution :) It’s for myself, really, because I’m pretty sure I’ll run into this one again. But if you find it useful, good for you! 😉 Problem So what is…Continue reading ILogger binding suddenly failing for Azure Functions – what to do?
This article describes how to fix and tweak your pre-build directives in Visual Studio – just in case they refuse to work properly. Because yeah, apparently that sometimes just randomly happens. But fear not – there’s a stupid and ugly, but definitely thoughtful workaround available! Also, sorry for the confusing title. I’m taking suggestions for a more descriptive one – but this one was kind of difficult to word clearly. Anyway – on to the topic of the day! Problem So you’re either trying to…Continue reading How to fix a build configuration that’s not available as a build directive in Visual Studio?
Building a proof-of-concept on .NET Core 3.0 preview 7 I ran into issues when developing web APIs. This release is production-ready (according to Microsoft -see below), but every now and then you run into really unintuitive and sometimes surprising issues. Go LiveNET Core 3.0 Preview 7 is supported by Microsoft and can be used in production. We strongly recommend that you test your app running on Preview 7 before deploying Preview 7 into production. If you find an issue with .NET Core 3.0, please file…Continue reading How to resolve build failing with .NET Core 3 and Microsoft.AspNetCore.Mvc.Versioning
Instead of being stuck on whatever version your SPFx project was originally created with, it’s possible and sometimes required to upgrade it afterwards to gain access to newer functionalities like integration with Microsoft Teams. This process, to me, is comparable to updating the .NET Framework version in your classic web application projects – while it’s sometimes a matter of simple configuration change and a rebuild, most of the time there’s a bunch of steps included and not all of them might be obvious or anywhere…Continue reading How to update SharePoint Framework for an SPFx webpart?
I recently ran into an issue when developing Azure Functions locally. My SPFx webpart was configured to request information from my locally running Azure Function, but suddenly started ending up in error. Browser only showed 404 for the first request (OPTIONS) the SPFx webpart was sending – although I knew the function was up and running! So what to do? Posts Related to “Azure Functions failing on “OPTIONS” call? Quick fix!”:How to get application settings for your Azure Function App using C#?Azure Functions suddenly throwing…Continue reading Azure Functions failing on “OPTIONS” call? Quick fix!
Is your Azure Web Application suffering from absolutely horrible load times every time someone accesses it for the first time every 15 minutes or so? Mine was. It was pitiful. I was developing a web-based service using EF6 and ASP.NET MVC 5, where all the assets were hosted in the Azure. Even though the app was reasonably lightweight and usually responded very fast, the first time someone accessed it in a while it took 20-60 seconds to load AND sometimes even timed out (especially with…Continue reading Solving Azure Web Application’s first load perfomance issues
This post describes how to fix the “Could not load file or assembly ‘[assemblyname]’ or one of its dependencies. An attempt was made to load a program with an incorrect format.” error. The solution described in this post shows you how to resolve the issue when you’re deploying from Visual Studio, but get an error somewhat like above when deploying to IIS or when opening your website after the deployment. This applies to your local development environment. Problem Especially while installing a new dev machine,…Continue reading Fixing the “Could not load file or assembly or one of its dependencies” error
In this post, I’ll try to archive everything you need to download and install to get commandlets like Connect-MsolService working. I’ve had to do it a couple of times when changing laptops, so it’s good to document them somewhere! :) So, when would you need to follow this guide and install the modules described here? Mostly this comes to play, when you’re switching machines, try to run the SharePoint Online Management shell but it doesn’t even exist on the machine, or it does exist but…Continue reading Getting Connect-MsolService (and other Azure Active Directory PowerShell cmdlets) to work
This post describes the actual, working and fast process of removing a site collection in SharePoint Online using the Remove-SPODeletedSite commandlet in SharePoint Online Management Shell (a flavor of PowerShell). Description Sometimes you need to get rid of a site collection you’ve created in SharePoint Online. The most typical example perhaps being removing the team site created for a group of people working together. That’s pretty simple and there are a few ways of doing that. For example, you might just go ahead, and delete the site…Continue reading Remove-SPODeletedSite – Actually removing a SharePoint Online Site Collection
In this post I instruct a simple way to stop SharePoint (either on-premises installation or SharePoint Online) from redirecting to Delve or MySites (respectively). The normal behavior is, that this happens when users click any name of a user anywhere in SharePoint. This is often not desired, and sometimes just confusing or impractical. Problem If your customers are like mine, a lot of them hate Delve or MySite or both. Or maybe they just are’nt willing to yet adopt Delve. Or perhaps you’ve heard of…Continue reading Disabling Delve/MySite redirection from SharePoint Site Collections
This post describes how to run Entity Framework’s code-first migrations against a database located in the Windows Azure. This is done by running Update-Database commandlet with suitable switches, see below. The problem and symptoms Okay, so you’re developing your MVC+EF cool web app with a database in Azure, and you’re using code-first migrations. Cool! What’s nice with code-first-migrations is the fact they are run automatically even in the cloud the next time your app is running (as long as you publish your app with that…Continue reading Applying Entity Framework’s Code-First Migrations against a Database in Azure by running Update-Database
This post describes one of the more no-brainerish ways of fixing a ‘System.OutOfMemoryException’ exceptions being thrown in your ASP.Net MVC application using C# and Entity Framework. Problem While developing a web project, for example an ASP.NET MVC web application which is using EF, sometimes when handling a lot of data or complex entities on your dev machine, you encounter this error: This of course blocks you from debugging or even running at least this part of your code locally. What to do? Reason By default,…Continue reading Exception of type ‘System.OutOfMemoryException’ was thrown.
This page describes mutiple ways on how to fix the exception ‘Spatial types and functions are not available for this provider because the assembly ‘Microsoft.SqlServer.Types’ version 10 or higher could not be found.‘ which comes up during debugging or publishing your program, app or service using DbGeography. Symptoms While running a console program or perhaps installing an ASP.NET MVC website on a machine, where SQL Server (apart from the one that comes with the Visual Studio) has not been installed, you may encounter the following error:…Continue reading Solving the “Spatial types and functions are not available …” -problem