skip to content
Relatively General .NET

Using Unix domain sockets with ASP.NET Core and HttpClient

by Andrew Lock

posted on: February 27, 2024

In this post I show how to create an ASP.NET Core server that listens using Unix domain sockets, and how to call the server using an HttpClient…

The FAST and the Fluent: A Blazor story

by Vincent Baaij

posted on: February 26, 2024

Learn about the origin of the building blocks of the Fluent UI Blazor library. We'll talk about FAST, Web Components, Fluent Design, and more.

Enable AutoLogin in Windows using .NET

by Gérald Barré

posted on: February 26, 2024

If you need to enable AutoLogin in Windows, you can use the registry. However, the password is stored in clear text. It's not a good idea to store a password in clear text. Instead, you can use the LSA to encrypt the password. Note that this is what SysInternals Autologon does. Also, note that the

RavenDB, Raspberry Pi & Hugin Appliance: oh my!

by Oren Eini

posted on: February 23, 2024

RavenDB can run on the Raspberry Pi, it is actually an important use case for us when our users are deploying RavenDB as part of Internet of Things systems. We wanted to showcase RavenDB’s performance and decided that instead of scaling up and showing you how well RavenDB does ridiculous loads, we’ll go the other way around. We’ll go small, and let you directly experience how efficient RavenDB is.You can look at the demo unit directly on this page.We decided to dial it down yet further, and run RavenDB on the Raspberry Pi Zero. This tiny computer is about the size of a cigarette lighter and is small enough to comfortably fit on your keychain. Most Raspberry Pis are impressive machines given their cost, more than powerful enough to power real applications.Here is what this actually looks like, with me as a reference for size 🙂.However, just installing RavenDB on the Zero isn't much of a challenge or particularly interesting, to be honest. We wanted to do something that would be both fun and useful. One of the features we want users to explore is the ability to run RavenDB in appliance mode. The question is, what sort of an appliance will we build?A key part of our thinking was that we wanted to show something that works with realistic data sizes. We wanted to have an actual use case for this, beyond just showing a toy. One of the things that I always find maddening about being disconnected is that I feel like half my brain has been cut away. We set out to fix that, the project is to create a knowledge system inside the Pi Zero that would be truly Plug & Play. That turned out to be quite a challenge, but I think we met it in a very nice manner.We went to archive.org and got some of the Stack Exchange data sets. In particular, we got the datasets that are most interesting for DevOps scenarios. In particular, we have raspberrypi.stackexchange.com, unix.stackexchange.com, serverfault.com, and superuser.com.I find it deliciously recursive that we can use the Raspberry Pi Zero to store the dataset about the Raspberry Pi itself. We loaded all those datasets into the Zero, for a total of about 7.5 GB, and over 4.2 million documents were stored there.Note that this is using RavenDB’s document compression, which reduced the total size by over 50% over the original dataset size. Next was the time to actually make this accessible. Just working with RavenDB directly to query the data is cool, for sure, but we wanted to be useful.So we built a portal to access the data. Here is what it looks like when you enter it for the first time:We offer full search capabilities and complete offline access to all those data sets. Perfect when you are stuck in the middle of nowhere and urgently need to remember that awk syntax or how to configure networking on a stubborn device. Another aspect that we have to consider is how this can work? The Raspberry Pi Zero is a tiny device, and actually working with it can be annoying. It needs Micro-USB power but has no ethernet or standard USB ports. For display, it uses a mini HDMI port. That means that you can safely assume that you’re likely to have a power cable for it, but not much else. We want to provide a good solution, so what do we do? The Raspberry Pi Zero we use does have a wifi chip, so we took things further and set it up as an access point with a captive portal.You can read exactly how we configured that in this post.In other words, the expected deployment model is to plug this into power, wait 30 seconds for the machine to boot, and then connect to the “Hugin” wireless network. You will then land directly into the application, able to deep dive into the questions of your choice.We have been giving away those appliances at the DevWeek conference, and we got a really good reaction from users. Beyond the coolness factor, the fact that we can run a high-performance system on top of a… challenging hardware platform (512MB RAM, 1Ghz RAM, SD Card for disk) and still provide sub-100ms response times is quite amazing.You can view the project page here, the entire thing is Open Source, and you can explore how we are able to do that on GitHub.

An Active Local NuGet Server

by Ardalis

posted on: February 22, 2024

As I'm writing this the Internet is out. When that happens, it makes it very difficult to work on development projects that have NuGet…Keep Reading →

WinForms in a 64-Bit world – our strategy going forward

by Klaus Loeffelmann

posted on: February 22, 2024

32-bit components can impose challenges for WinForms developers in a 64-bit Visual Studio environment, but there are options to solve this. Component modernization, migrating to .NET 6+ and a new option to use the out-of-process Designer for Framework are the key to a feasible way forward!

Introducing Modular Monoliths: The Goldilocks Architecture

by Ardalis

posted on: February 21, 2024

In the world of software architecture, finding the perfect balance between complexity and simplicity can often feel like an elusive quest…Keep Reading →

Using named pipes with ASP.NET Core and HttpClient

by Andrew Lock

posted on: February 20, 2024

In this post I show how to create an ASP.NET Core server that listens using Windows Named Pipes, and how to call the server using an HttpClient…

Developing Optimized GitHub Actions with .NET and Native AOT

by David Pine

posted on: February 19, 2024

Explore a fun example app targeting GitHub Actions written entirely in .NET, optimized with Native AOT, and published to the GitHub Container Registry.

Getting all exceptions thrown from Parallel.ForEachAsync

by Gérald Barré

posted on: February 19, 2024

In C# you can write async code that looks like synchronous code. People using async/await expect to be able to catch specific exception types as synchronous code. This is very convenient, but sometimes you want to get all exceptions thrown from an async method.C#copytry { // This will throw mul