Hosting an ASP.NET Core web application in Azure

As a side project, I am working on a web application that I want to host in Azure eventually. There is a ton of documentation available around Azure but instructions vary by product. I have documented the steps I needed to run a web application in Azure. To make it easier to automate the deployment steps I am avoiding the Azure portal. I want to script these steps later so that I can automate my deployments. …

Authorizing Managed Service Identity in Azure SQL Database

When trying to deploy a simple web application and Azure SQL database through Azure DevOps pipelines, I wanted to use a system managed application identity to authorize the web application to access the database. This requires running something like the following SQL script on the Azure SQL database. CREATE USER [<identity-name>] FROM EXTERNAL PROVIDER; ALTER ROLE db_datareader ADD MEMBER [<identity-name>]; ALTER ROLE db_datawriter ADD MEMBER [<identity-name>]; ALTER ROLE db_ddladmin ADD MEMBER [<identity-name>]; I was having a lot of trouble getting the Azure SqlCmd task to work, while the error(s) it was showing was not helpful at all. …

Reducing GuidCombGenerator allocations

Recently at work, I had to implement some functionality that required the use of Guid identifiers that were stored in SQL Server. The Guids were generated in the application and used as an alternative key / external identifier for other systems. To avoid excessive index fragmentation, we opted to use the GuidComb variant using a generator from the NHibernate project. The GuidCombGenerator generates Guid values that have a timestamp embedded into the last 6 bytes. …

SSH cmdlets missing from posh-git

After repaving my machine and installing the latest version of posh-git I noticed that my Powershell profile was no longer working properly. I was using the Start-SshAgent cmdlet to load my SSH keys and well, it was no longer recognized. When I checked the GitHub repository, it was not immediately clear that these have been moved to a separate project: posh-sshell. Follow the instructions (or clone the repository), and include this new Powershell module as well in your profile! …

Using built-in SSH with Git on Windows 10

Starting with Windows 10 version 1803 a native version of OpenSSH is bundled and installed by default. If you are using posh-git you’ll notice that the Start-SshAgent command fails with an error: unable to start ssh-agent service, error :1058 Error connecting to agent: No such file or directory This is because by default the OpenSSH agent (ssh-agent) service is disabled. To enable it, open an elevated PowerShell window and run: …

Introducing FdbServer

As a side project, I’ve been working on my implementation of a FoundationDB client for .NET. I want to have tests to verify things are working properly, and for local development that isn’t such a problem since I usually have a FoundationDB server installed. However, when I want to run these tests on a build server I do not want to enforce installing FoundationDB in the build environment, things should just work. …

Hello world!

This is the first post on my blog! Let’s hope I can keep this up. I’ll usually blog about things I’ve solved as a form of documentation, which I hope will help someone else as well. Used technology Since this is a technology blog, I’ll list the technology that powers this blog currently. Hugo The blog is powered by Hugo, which is a static site generator written in the Go programming language. …