My personal Delve Blog on my test tenant.

How to migrate your Delve Blogs content to Modern SharePoint?

You might’ve heard the news – Delve Blogs are on the way out, leaving your users without a blogging platform on Office 365, and their data homeless. And by homeless, I mean deleted pretty soon. And by pretty soon I mean really soon. Might be a good time to start thinking about storing it somewhere else instead! While we’re all still waiting to see whether Microsoft sticks to their ambitious schedule (partial content freeze in December 2019, total content freeze in January 2020, and finally,…Continue reading How to migrate your Delve Blogs content to Modern SharePoint?

Delve logo

How to export your Delve blogs content?

The news is out – Delve Blogs will be axed, leaving your users without a blogging platform on Office 365, and their data homeless. And by homeless, I mean deleted. Might be a good time to start thinking about storing it somewhere else instead! This post is the second post in my impromptu, Delve Blogs -themed blog series: Part 1: Delve Blogs getting deprecated – what do? Part 2: How to export your Delve blogs content? (this post) Part 3: How to migrate your Delve…Continue reading How to export your Delve blogs content?

Delve logo

Delve Blogs getting deprecated – what do?

Last week, Microsoft sent a surprise email to a number of customers. Delve blogs – the hated & loved self-serve internal blogging platform on Office 365 is getting axed. It doesn’t really come as a surprise at this point – the service was first announced in 2014, launched to some hype and appreciation (especially due to the new CMS – authoring canvas – which was a lot of fun compared to Classic SharePoint!) but has pretty much faded away after that. Microsoft describes the feature…Continue reading Delve Blogs getting deprecated – what do?

SOLVE ALL THE ERRORS!

Microsoft website fails to log you in with an error: “Unable to service request”

Okay – so this one is going to be a simple blog post. I’ll be explaining an apparent fan favorite – MSDN forums, MSDN subscriber downloads or other Microsoft web properties are not letting you sign in, but rather throw the following error: Unable to service request Why do you get an error like this? How to resolve it? Background Posts Related to “Microsoft website fails to log you in with an error: “Unable to service request””:The Scary Anatomy of a Microsoft License FraudSharePoint Home,…Continue reading Microsoft website fails to log you in with an error: “Unable to service request”

An accurate depiction of a NuGet package factory

Solving: ‘DbContextOptionsBuilder’ does not contain a definition for ‘UseSqlServer’

This is another, kind of a classic and simple solution to a fairly simple problem: how to fix it, when your DbContextOptionsBuilder fails to take in your connection string and complains about UseSeqlServer ? So, let’s set the scene. You’re building your DbContext (called ApplicationDbContext in the example below) in a .NET Core application of some sorts. You’ll do this like shown below: using Microsoft.EntityFrameworkCore; using System;   namespace YourNamespace { public class YourClass { private string _connectionString = "This comes from your configuration file";…Continue reading Solving: ‘DbContextOptionsBuilder’ does not contain a definition for ‘UseSqlServer’

Azure Active Directory, the advanced logo

Iterating Group memberships using Claims in .NET Core

Another case, where there’s plenty of documentation, but it just doesn’t seem to be comprehensive enough or just doesn’t apply for any of the cases that I have – for whatever reason. Maybe my cases are wrong, or I’m just bad at googling, but I’ve struggled to find a good page documenting this. Perfect case for another blog post about the topic, then – perhaps someone else will find it useful! This post answers the question: How to get Claims for a user in .NET…Continue reading Iterating Group memberships using Claims in .NET Core

Internet Explorer working like Internet Explorer usually does - not working. But this time it's Blazor's fault!

IE11 fails to load a (server-side) Blazor web app

Welp – this was not a fun issue to run into! While nobody in this day and age should use Internet Explorer for any normal usage (occasional legacy scenarios aside), there are still some luddites who do (or whose IT department makes them to). This means it’s still useful, and sometimes even required, for a web application to work even in Internet Explorer. Description of the issue So, like shown in the article’s image, when trying to access your web application using IE11, the page…Continue reading IE11 fails to load a (server-side) Blazor web app

Entity Framework Core logo

How to instantiate your DbContext outside your Data project?

When you’re in your .NET Core project, it’s always easy: you just register your DbContext in ConfigureServices, and then inject it into whichever Page, View or Controller you might need it in. However, when you have another project or solution you’re working on and you’d still like to use the same DbContext and your entity classes in it, you have to find another way to do it! What should we do, then? Description Let’s first take a look at the use cases and tech stack.…Continue reading How to instantiate your DbContext outside your Data project?

Hacktoberfest 2019 logo

Another year, another Hacktoberfest (2019)!

Like a lot of the more frequent readers of this blog know, I generally work in proprietary – that is, non-open-source – projects. Whenever I do have some time to dabble in OSS, it’s usually for a hobby. This time around, I’ve been really struggling to find the time to contribute to open-source projects. Last year I had just had a baby – so it’s not like I was sleeping anyway. I was able to submit a few useful scripts, bugfixes and documentation improvements during…Continue reading Another year, another Hacktoberfest (2019)!

Version Control problems

How to resolve “refusing to allow an integration to create or update .github/workflows/main.yml” on GitHub Desktop?

Ran into this one when trying to push my merge from upstream. I was adhering to my own instructions (see below for a link), but got the error (further below) that stopped me from using GitHub Desktop to push (sync) at all. Posts Related to “How to resolve “refusing to allow an integration to create or update .github/workflows/main.yml” on GitHub Desktop?”:The Scary Anatomy of a Microsoft License Fraud5 ways to enable Custom Scripts for a SharePoint site collectionSharePoint Home, Hub, Sites, Start… What?

Always ship Azure DevOps.

How to use the right version of the WebDriver on hosted agents in Azure DevOps?

We were working on getting our Robot Framework tests running during our builds on Azure DevOps. However, using hosted agents, it was quite a struggle to get all of the dependencies on the agent and make sure the tests can access the browser on the build machine. In our case, we were running the tests in Chrome. For this, we needed Robot Framework and some of its dependencies to be installed on the machine. Luckily, that wasn’t too complicated – however, getting the WebDriver that…Continue reading How to use the right version of the WebDriver on hosted agents in Azure DevOps?

Build successful? SHIP IT!

EF Core fails to load hostpolicy.dll when RuntimeIdentifier is win-x86

Ran into another interesting one when working with a .NET Core 3.0 project and Entity Framework Core – this time, RuntimeIdentifier configuration causing trouble. In short, running Update-Database (to apply code-first migrations to your local database) locally would return this, annoying error: Failed to load the dll from [runtimepath]\win-x86\hostpolicy.dll], HRESULT: 0x800700C1 An error occurred while loading required library hostpolicy.dll from [runtimepath]\win-x86\] I suspect this can happen with any x86 runtimeIdentifier, but the one I had specified in my .csproj-file was this: <RuntimeIdentifier>win-x86</RuntimeIdentifier> This value (or…Continue reading EF Core fails to load hostpolicy.dll when RuntimeIdentifier is win-x86

Blazor blazing away some geeks.

How to fix “The type or namespace name ‘Services’ does not exist in the namespace ‘Microsoft.AspNetCore.Components’ (are you missing an assembly reference?)”

Just resolved a random issue that’s difficult enough to google, that I think it’s worth documenting! These seem to be popping up whenever you work with anything that’s fairly fresh out of oven… This particular case revolves around Visual Studio being incredibly obnoxious, and starting to throw a ton of errors on code that worked five minutes prior. In my case, the error happened after updates to Visual Studio. Always fun. Symptoms The errors started popping up in Visual Studio. Basically, I just started getting…Continue reading How to fix “The type or namespace name ‘Services’ does not exist in the namespace ‘Microsoft.AspNetCore.Components’ (are you missing an assembly reference?)”

Azure DevOps - Always Be Shipping!

Azure DevOps – how to package a single DLL?

Okay – a quick piece of documentation that was a bit lackluster, so it’s again a good idea to log somewhere. How to package a simple DLL that’s a result of your Azure DevOps Pipeline? In my particular case, I have configured a post-build step to obfuscate the DLL, that’s first built by MSBuild. That works nicely. However, the default way to create a NuGet package, where you select a project (usually you pass the same variable to NuGet pack command that you used earlier…Continue reading Azure DevOps – how to package a single DLL?

.NET Core fundamentals in one picture.

How to use UriHelper or NavigationManager in .NET Core 3.0 & Blazor?

Just a quick piece of documentation, as this piece of code has changed in different versions of .NET Core 3.0 so far a few times. Need to have things like this written down somewhere! UriHelper / NavigationManager with .NET Core 3.0 Both of these helper libraries do essentially the same thing: navigate/browse/redirect the user to a different address, component, page or view in or by your web app. What you normally use this library for is exactly the same in all versions I’ve worked with,…Continue reading How to use UriHelper or NavigationManager in .NET Core 3.0 & Blazor?

Azure DevOps - Always Be Shipping!

Azure DevOps build fails with “The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages.”

This was another peculiar one – something, that didn’t bring up too many results on Google. Always fun trying to figure out those! So, when configuring an Azure DevOps pipeline (build) for a .NET project, you might run into this annoying error: ##[error]The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory. Job: “The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages. Please specify…Continue reading Azure DevOps build fails with “The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages.”

A simple graphical explanation of Blazor's effect on the web development landscape.

HttpClient in Blazor

Blazor is a new (ish) framework for building web UIs with C#. It either uses SignalR to manage connections between your client-side and server-side code, or even compiles directly to WebAssembly, in both cases cutting out the need to write any pesky JavaScript yourself – pretty neat, if you ask me! However, developing your web apps with Blazor is a bit different from using ASP.NET MVC, for example. Other people have written great introductions to the tech, so I’ll stick to the problem at hand:…Continue reading HttpClient in Blazor

Application Insights in the Azure Marketplace

List of Azure Regions, where Application Insights is available

This article describes the Azure regions, where Azure Monitor Application Insights is available. Azure regions A region is a set of datacenters deployed within a latency-defined perimeter and connected through a dedicated regional low-latency network. Depending on who’s talking, regions are sometimes called locations, geolocations or just geos. Azure regions give customers the flexibility to deploy their applications where they need to. Azure is generally available in 44 regions around the world, with plans announced for 10 additional regions. However, not all features are available…Continue reading List of Azure Regions, where Application Insights is available

.NET logo

How to get the Description for a property in ASP.NET MVC 5?

This post describes the easiest way to show description texts for properties in ASP.NET MVC 5. Sounds simple, right? We can use something like @Html.DescriptionFor(x => x.Property), right? Alas, it’s not that straightforward. A bit surprisingly, there’s no ready-made helper function for this. I’m saying “surprisingly”, because I feel like MVC 5 really already has all the bells and whistles – AND the kitchen sink. But no, it does not have a helper for getting a description of a property :) You can, however, define…Continue reading How to get the Description for a property in ASP.NET MVC 5?

.NET Core fundamentals in one picture.

How to add creator/modified info to all of your EF models at once in .NET Core

This is a tip that should often be the first thing you do in your projects with database backend, no matter which technology you use: Add some basic info about modified and created times, and the user information – so that if something happens, everyone will know who to blame 😉 There’s a lot of great blog articles describing how to do this in .NET Framework, but not that many for .NET Core. It’s very similar, but not the same. I learned that by copy-pasting…Continue reading How to add creator/modified info to all of your EF models at once in .NET Core