finds.dev← search

// the find

davidfowl/AspNetCoreDiagnosticScenarios

★ 8,508 · C# · updated May 2024

This repository has examples of broken patterns in ASP.NET Core applications

A reference collection of anti-patterns and correct patterns for ASP.NET Core, maintained by David Fowler (ASP.NET Core architect). The meat is in the markdown guides — AsyncGuidance.md especially — with runnable controller examples that demonstrate the broken and fixed versions side by side. Aimed at developers who know ASP.NET Core but keep stepping on the same async and scalability landmines.

The async guidance is the best single document on C# async pitfalls outside of the official docs — it covers deadlocks, sync-over-async, fire-and-forget, CancellationToken propagation with real controller code you can run. The HttpClient guidance is equally solid: connection exhaustion, header injection, DNS refresh. Comes from David Fowl himself, so the advice is authoritative rather than blog-post speculation. The runnable Scenarios project means you can actually reproduce the bad behavior, not just read about it.

Last meaningful update is effectively 2021-2022 despite a 2024 commit; minimal mention of .NET 6+ features like minimal APIs, IHostedService patterns in modern workers, or the PipeWriter/PipeReader patterns that replaced a lot of stream-based anti-patterns. The Scenarios project is a barebones controller app with no tests — you run it and eyeball behavior, which is fine for demos but limits automated regression. Coverage is narrowly focused on async and HTTP; nothing on EF Core misuse, memory pressure from Span<T> mishandling, or gRPC patterns.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →