DeveloperExceptionPageMiddleware
DeveloperExceptionPageMiddleware is ASP.NET Core middleware that catches unhandled pipeline exceptions and generates a detailed diagnostic error page for developers.
ASP.NET Core in Action, 3e
A developer exception page is an ASP.NET Core diagnostic page that displays detailed information about an unhandled exception during development.
- How it is used
- Provides detailed error feedback when an exception occurs during development.
- How deep it goes
- Explains pipeline exception capture, the 500 response, displayed diagnostics, and environment-specific setup without implementing custom middleware.
- Examples
- Shows a minimal API pipeline, a diagnostic page with stack trace and request details, and a production `/error` endpoint.
- What you can do after
- Diagnose/debug with it during development while choosing a safer error response for production.
Read how ASP.NET Core in Action, 3e explains DeveloperExceptionPageMiddleware →
Building Web APIs with ASP.NET Core
DeveloperExceptionPageMiddleware is ASP.NET Core middleware that captures pipeline exceptions and generates an HTML page containing detailed diagnostic information.
- How it is used
- Handles development-time HTTP pipeline failures by presenting detailed diagnostic information to developers.
- How deep it goes
- Explains synchronous and asynchronous exception capture, diagnostic contents, environment selection, and a verification endpoint.
- Examples
- Uses Program.cs configuration and test endpoints that throw Exception("test") to demonstrate generated error responses.
- What you can do after
- Diagnose/debug with it by enabling detailed development errors and routing nondevelopment failures through /error.
Read how Building Web APIs with ASP.NET Core explains DeveloperExceptionPageMiddleware →
Related concepts
- WebApplicationconfigured by · WebApplication is an ASP.NET Core application type that hosts configured services, runs the web server, and exposes the HTTP request-processing pipeline.
- request pipelineuses · A request pipeline is an ordered sequence of processing components through which HTTP requests and their responses pass in a web application.
- middlewareuses · Middleware is an intermediate software component or layer that processes or mediates requests, messages, or operations between other components, often adding behavior or controlling their flow.
- Swagger UIcontrasts with · Swagger UI is a web-based tool that renders OpenAPI descriptions as interactive documentation for exploring and testing HTTP APIs.
- HTMLproduces · HTML (HyperText Markup Language) is the standard markup language for structuring content and elements in web documents.
- ExceptionHandlerMiddlewarealternative to · ExceptionHandlerMiddleware is ASP.NET Core HTTP middleware that intercepts unhandled exceptions and generates or redirects to an error response.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

