Josef Ottosson

Freelancing Developer · Microsoft MVP

Subscribe via RSS
© Josef Ottosson 2026
azure

Azure AppService - 502 Bad Gateway - HTTP/2

HTTP 2.0 Proxy in Azure AppService can cause 502 Bad Gateway responses.

6 days ago June 10th, 2026 1 min read
dotnet core

Force DbContext SaveChanges to throw exception during test

Forcing exceptions from Entity Framework Core during integration tests using interceptors.

5 months ago January 8th, 2026 3 min read
dotnet

IDistributedCache (Redis) - remove by prefix

Implementing prefix-based cache invalidation in Redis using a dotnet core, a custom IDistributedCache implementation and some Lua scripting.

7 months ago November 25th, 2025 3 min read
dotnet core

Compress HttpClient requests with GZIP

By streaming the gzip compression instead of using MemoryStream, we can significantly reduce memory allocation and avoid OutOfMemoryExceptions with large payloads.

9 months ago September 12th, 2025 3 min read
dotnet

Read only properties on Domain object using Entity Framework Core

Storing immutable domain objects directly with Entity Framework Core using value converters and private backing fields to handle read-only collections and custom types.

10 months ago August 7th, 2025 5 min read
Subscribe via RSS
© Josef Ottosson 2026