Dela via


Microsoft.AspNetCore.Diagnostics Namespace

Contains types related to capturing and reporting diagnostics in ASP.NET Core. Middleware such as ExceptionHandlerMiddleware, DeveloperExceptionPageMiddleware, and StatusCodePagesMiddleware are used to handle errors in ASP.NET Core.

Classes

CompilationFailure

Describes a failure compiling a specific file.

DeveloperExceptionPageMiddleware

Captures synchronous and asynchronous exceptions from the pipeline and generates error responses.

DiagnosticMessage

A single diagnostic message.

ErrorContext

Provides context about the error currently being handled by the DeveloperExceptionPageMiddleware.

ExceptionHandlerFeature

A feature containing the path and error of the original request for examination by an exception handler.

ExceptionHandlerMiddleware

A middleware for handling exceptions in the application.

StatusCodeContext

Contains information used by the handler of the StatusCodePagesMiddleware.

StatusCodePagesFeature

Represents the Status code pages feature.

StatusCodePagesMiddleware

A middleware for generating the response body of error status codes with no body.

StatusCodeReExecuteFeature

Default implementation for IStatusCodeReExecuteFeature.

WelcomePageMiddleware

This middleware provides a default web page for new applications.

Interfaces

ICompilationException

Specifies the contract for an exception representing compilation failure.

IDeveloperPageExceptionFilter

Provides an extensibility point for changing the behavior of the DeveloperExceptionPageMiddleware.

IExceptionHandler

Represents an interface for handling exceptions in ASP.NET Core applications. IExceptionHandler implementations are used by the exception handler middleware.

IExceptionHandlerFeature

Represents a feature containing the error of the original request to be examined by an exception handler.

IExceptionHandlerPathFeature

Represents an exception handler with the original path of the request.

IStatusCodePagesFeature

Represents the Status code pages feature.

IStatusCodeReExecuteFeature

Represents a feature containing the path details of the original request. This feature is provided by the StatusCodePagesMiddleware when it re-execute the request pipeline with an alternative path to generate the response body.

Remarks

For more information about diagnostics, see Handle errors in ASP.NET Core.