Tag: .NET
All the articles with the tag ".NET".
- System.Text.Json polymorphic deserialization in .NET Deserialize JSON into derived or abstract types: $type discriminators, [JsonPolymorphic] in .NET 7+, and a custom JsonConverter for legacy payloads.
- Discriminated unions in C# before C# 15: the workarounds Before C# 15, C# had no discriminated unions. How ASP.NET Core Results<> fakes one with implicit operators, and when to use OneOf or F# instead.
- Duende IdentityServer: what it is and when you need it Duende IdentityServer is an OAuth 2.0 and OpenID Connect SDK for ASP.NET Core. What it does, how it differs from ASP.NET Core Identity, and when to skip it.
- Run Azurite storage emulator in Docker with Rider Run the Azurite storage emulator in Docker, keep blobs and queues local to each solution with a volume mount, and start it from a Rider run configuration.
- Server-Timing Headers in ASP.NET Core: Backend Metrics in Browser DevTools Add Server-Timing headers to an ASP.NET Core app so database and API timings show up in Chrome, Edge and Firefox DevTools next to the request.
- Device Bound Session Credentials in ASP.NET Core Device Bound Session Credentials tie a session cookie to a private key on the device, so stolen cookies go stale. How DBSC works, and why .NET 11 dropped it.
- Fix CS8618 Nullable Warnings in C# JSON Models Fix CS8618 non-nullable property warnings in C# JSON DTOs: compare nullable properties, constructors, default values and required, and why default! is risky.
- Run a .NET App as a Linux Service with systemd Run a .NET app as a Linux service: add Microsoft.Extensions.Hosting.Systemd, call UseSystemd(), write a Type=notify unit file, and read logs via journald.
- Using ASP.NET Core Passkeys for Second Factor Authentication Use passkeys as a second factor after password login in ASP.NET Core Identity on .NET 10, with a 2FA token provider and two endpoints to create and verify.
- Building a Supply Chain Attack with .NET and NuGet A story of building a supply chain attack with .NET and NuGet: package name spoofing, module initializers, source generators and MSBuild targets, and how to defend.