Implementing Custom ASP.NET Core Middleware for Request Logging
Learn to build custom ASP.NET Core middleware for request logging with a complete worked example, covering pipeline order, scoped service pitfalls, and async requirements.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn to build custom ASP.NET Core middleware for request logging with a complete worked example, covering pipeline order, scoped service pitfalls, and async requirements.
Identify EF Core lazy‑loading N+1 query symptoms, verify proxy configuration, add missing Includes, and apply fallback strategies when performance does not improve.
An architecture‑focused guide for adding ASP.NET Core Health Checks: requirements, minimal design, trust boundaries, operational settings, failure modes, and triggers for redesign.
Define a lightweight logging middleware that captures timestamp, method, path and status without blocking the pipeline, respects trust boundaries, and can be toggled via configuration.
Goal Route only critical and degraded health check events to an external alerting sink while suppressing healthy and informational status changes to reduce notification volume. Current constraints The IHealthCheckPublisher pipeline in ASP.NET Core 6.0+ delivers every health check execution result to all registered publishers. There is no built-in filter to e