Goodbye 2023, Welcome 2024
We are already in the last week of 2023. This year flew by and so many things happened that I cannot recall all of them. Let us have a look at the highlights of my 2023.
We are already in the last week of 2023. This year flew by and so many things happened that I cannot recall all of them. Let us have a look at the highlights of my 2023.
We needed a simple solution to run recurring jobs for our user group web site. WebJobs in Azure sounded like the perfect solution, but unfortunately they do not work with App Services on Linux. We needed another approach and we found a much better solution with Background Tasks. All we need to do is to implement the two interfaces IHostedService and IDisposable, and the worker runs outside of the requests to our application.
If you need an API endpoint that gives you some (static) test data, you can join the search for the most complicated solution. My current favourite in unnecessary complexity is to use MongoDB to serve a handful of JSON objects.
However, if you prefer a much lighter approach and already use .Net, I strongly recommend that you try Web API for this task. It only takes a few lines to get your data in a format that you can access from your application. And if you want to keep going on, you can add more functionality with ease.
Since I wrote about how to migrate from Moq to NSubstitute, we decided to migrate our work projects as well. The migration was much simpler than anticipated and we got some nice benefits along the way.
Do you like coding puzzles? If so, you should go to AdventOfCode.com and prepare yourself for some funny little coding challenges.
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.
If we want to test our code, we often need files with the right format. We can create a text file without much effort, but what do we do if we need a specific video format or an audio file in OGG?
Luckily, we are not the only ones with this problem. There are dedicated sites that offers a wide range of file formats that we can use for testing.
QR codes are a nice way to supply your users with an URL without letting them type it into their mobile devices. All they need to do is to point their camera to the QR code and scan it. There are many libraries to create QR codes with .Net. Unfortunately, not all are working with .Net 6 and newer. In this post we explore a user-friendly library that works with .Net 6 and .Net 7.
If we want to find the newest commit that is in our main and in our feature branch, we can use this Git command:
1fe43981b856bkk8958494949494949494493339
We run into a strange error last week when we no longer could install NuGet packages from our Azure DevOps feed. Visual Studio only gave us a basic error message about SSL connections, but to get some details we needed to run dotnet restore:
error : The SSL connection could not be established, see inner exception. error : Authentication failed because the remote party sent a TLS alert: 'HandshakeFailure'.
While solving the annoying problem with the *.bacpac files, I was not sure what edition of SQL Server I have installed on my machine. The simplest way to figure out what edition you run is to start SQL Server Management Studio, connect to your SQL Server and right click on the Server node. In the Properties you find an entry for the Product and that shows what edition you use: