Your DI Container Is Hiding a Bug Right Now

2026 | Sudip Parajuli


A singleton service holding a reference to a scoped dependency is one of the most common production bugs in .NET dependency injection — and the compiler will never warn you about it.

Service lifetimes should be chosen based on actual state management needs, not performance assumptions. The full article walks through exactly how this bug creates shared state across requests, and how to catch it before it ships.

Read the full article on Medium.

© 2026 Sudip Parajuli. All rights reserved.