Double-clicking .sql Files Opens New Instance of SSMS 20

March 25, 2024

I recently upgraded to SQL Server Management Studio 20.0. After doing so, any time I double-clicked on a .sql file, it opened a new instance of SSMS instead of opening the file in my existing, open intance. After digging around for a bit, I finally found a registry hack that restores the appropriate behavior.

Continue reading...

Setting Up a Service Principal to Deploy to Azure App Service With GitHub Actions

December 30, 2023

I started moving my personal applications out of Azure DevOps and into GitHub. As part of that, I needed to convert my DevOps Pipelines into GitHub Actions.

Figuring out how to get GitHub Actions to authenticate with Azure App Service and do deployment tasks was not completely straightforward, but after a ton of googling and experimenting, I figured out just enough to make it work. Read on to see the steps.

Continue reading...

IHttpContextAccessor Performance

September 5, 2023

In my ASP.NET Core applications, I have a few scoped services that require an HttpContext, but that don’t have a way to directly pass the context as a method parameter. In these cases, the docs say to inject IHttpContextAccessor into your classes. However, if you read the API docs for IHttpContextAccessor, you see a big warning in the Remarks:

This interface should be used with caution. It relies on AsyncLocal<T> which can have a negative performance impact on async calls.

That sounds bad. Should I avoid using IHttpContextAccessor?

Continue reading...

Now, with search!

July 15, 2023

I have wanted to add search to this blog for quite a while now, but since its contents are statically generated by hugo, I couldn’t use any of my familiar .NET server-side tricks.

Fortunately, a lot of smart people are churning out interesting new tools and technologies, and still other smart people have solved my particular problem and documented their solutions.

Continue reading...

Hugo Site.RSSLink Is Deprecated

July 6, 2023

I haven’t posted here in quite some time. When I fired up hugo today to make a small tweak, I got this warning:

WARN  Site.RSSLink is deprecated and will be removed in a future release. Use the Output Format's Permalink method instead, e.g. .OutputFormats.Get "RSS".Permalink

I need the top-level RSS URL in my blog pages because I only want to have one top-level RSS feed, not one per hierarchy level as hugo likes to spit out.

Fortunately, after a little digging, I found a simple fix on the support forums.

Continue reading...

Azure DevOps Expired Service Principal

September 15, 2021

Fix your failed Azure DevOps Release Pipeline if you get this error:

Error: Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired.

Continue reading...

Locally Debugging an Event Grid event in an Azure Function

December 6, 2020
I have a requirement to add a JSON file to Azure Blob Storage and have an Azure Function automatically process it via a BlobTrigger. Simple enough, but when reading the docs for BlobTrigger, I came across this section on Polling (emphasis mine): In addition, storage logs are created on a “best effort” basis. There’s no guarantee that all events are captured. Under some conditions, logs may be missed. If you require faster or more reliable blob processing, consider creating a queue message when you create the blob.

Continue reading...

Migrated to Hugo

August 30, 2020

I have successfully migrated my blog from Jekyll to Hugo. The ability to generate the entire site from a single executable is very appealing. What pushed me to finally make the move was a security notification from GitHub: apparently one of the ruby gems Jekyll relies on had a vulnerability. I’m not a ruby developer, and I blog so infrequently that it’s a pain to try to remember how to update my local ruby environment and keep everything working, so… Hugo it is!

Continue reading...

How to use .NET Standard 2.0 NuGet packages with F# Interactive

June 26, 2018

I have been learning F# recently, and one of the great things about it is the REPL, called F# Interactive.

I ran into a problem when I tried to reference the Newtonsoft.Json NuGet package in an .fsx file, like so:

Continue reading...

Project file is incomplete. Expected imports are missing.

June 12, 2018

After many months of doing other things, one of our devs tried to open our solution in the latest version of Visual Studio 2017 (15.7.3), only to be greeted with the following error message:

Project file is incomplete. Expected imports are missing.

Huh?

Continue reading...