Interview: What every developer must understand with tech CEO Oren Eini!
by Oren Eini
posted on: October 10, 2022
A few days ago I had an interview with Milan Groeneweg, I think it was quite interesting, even if I say so myself .
by Oren Eini
posted on: October 10, 2022
A few days ago I had an interview with Milan Groeneweg, I think it was quite interesting, even if I say so myself .
by Gérald Barré
posted on: October 10, 2022
In the previous post, I explained the best practices for NuGet packages. In this post, I will show how to create and publish a NuGet package that follows best practices using GitHub and GitHub Actions. Table Of ContentsCreate the projectGitHub ActionsEnable the .NET SDK package validationInclude sy
by Andrew Lock
posted on: October 04, 2022
In this post I describe how to to verify your strongly typed configuration objects are correctly bound to your configuration at app startup…
by Oren Eini
posted on: October 03, 2022
A customer called us with a problem. They set up a production cluster successfully, they could manually verify that everything is working, except that it would fail when they try to connect to it via the client API. The error in question looked something like this: CertificateNameMismatchException: You are trying to contact host rvn-db-72 but the hostname must match one of the CN or SAN properties of the server certificate: CN=rvn-db-72, OU=UAT, OU=Computers, OU=Operations, OU=Jam, DC=example, DC=com, DNS Name=rvn-db-72.jam.example.com That is… a really strange error. Because they were accessing the server using: rvn-db-72.jam.example.com, and that was the configured certificate for it. But for some reason the RavenDB client was trying to connect directly to rvn-db-72. It was able to connect to it, but failed on the hostname validation because the certificates didn’t match. Initially, we suspected that there is some sort of a MITM or some network appliance that got in the way, but we finally figured out that we had the following sequence of events, shown in the image below. The RavenDB client was properly configured, but when it asked the server where the database is, the server would give the wrong URL, leading to this error. This deserves some explanation. When we initialize the RavenDB client, one of the first things that the client does is query the cluster for the URLs where it can find the database it needs to work with. This is because the distribution of databases in a cluster doesn’t have to match the nodes in the cluster. Consider this setup: In this case, we have three nodes in the cluster, but the “Orders DB” is located only on two of them. If we query the rvn-db-72 database for the topology of “Orders DB”, we’ll get nodes rvn-db-73 and rvn-db-74. Here is what this will look like: Now that we understand what is going on, what is the root cause of the problem? A misconfigured server, basically. The PublicServerUrl for the server in question was left as the hostname, instead of the full domain name. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters { "...": ".. other configuration .. ", "PublicServerUrl": "https://rvn-db-72" } view raw settings.json hosted with ❤ by GitHub This configuration meant that the server would give the wrong URL to the client, which would then fail. This is something that only the client API is doing, so the Studio behaved just fine, which made it harder to figure out what exactly is going on there. The actual fix is trivial, naturally, but figuring it out took too long. We’ll be adding an alert to detect and resolve misconfigurations like that in the future.
by Gérald Barré
posted on: October 03, 2022
Creating a NuGet package is as easy as dotnet pack. But, you may not be aware of all the best practices that you should follow to ensure your package is as good as it can be. In this post, I describe how to ensure your NuGet packages follow best practices before publishing them to a repository such
by Andrew Lock
posted on: September 29, 2022
ASP.NET Core in Action, version 3, is available now from Manning's Early Access Program, and is fully updated to .NET 7.…
by Oren Eini
posted on: September 28, 2022
My article about Data Management in Complex Systems was published in DZone as part of DZone's 2022 Database Systems Trend Report. I would love your feedback on it.
by Gérald Barré
posted on: September 26, 2022
When an application is not running well, it could be useful to generate a dump file to debug it. There are many ways to generate a dump file on Windows, Linux, or Azure. Table Of ContentsWindowsdotnet-dump (Windows)Windows Task ManagerSysInternals - Process ExplorerSysInternals - ProcDump (Windows)
by Andrew Lock
posted on: September 20, 2022
In this post I describe an algorithm to count the number of leading zeroes in a ulong, study how it works, and benchmark it against alternatives.…
by Gérald Barré
posted on: September 19, 2022
Someone asked me why I set AllowUnsafeBlocks to true in the Meziantou.DotNet.CodingStandard package (source). In this post, I'll explain what this property enables, and why it is not more unsafe to set it to true.#The AllowUnsafeBlocks propertyThe AllowUnsafeBlocks compiler option allows code that