DeveloperExceptionPageMiddleware Class

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

Namespace
Microsoft.AspNetCore.Diagnostics
Assemblies
  • Microsoft.AspNetCore.Diagnostics

Syntax

public class DeveloperExceptionPageMiddleware
class Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware

Constructors

DeveloperExceptionPageMiddleware(Microsoft.AspNetCore.Http.RequestDelegate, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.DeveloperExceptionPageOptions>, Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.AspNetCore.Hosting.IHostingEnvironment, System.Diagnostics.DiagnosticSource)

Initializes a new instance of the Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware class

public DeveloperExceptionPageMiddleware(RequestDelegate next, IOptions<DeveloperExceptionPageOptions> options, ILoggerFactory loggerFactory, IHostingEnvironment hostingEnvironment, DiagnosticSource diagnosticSource)

Methods

Invoke(Microsoft.AspNetCore.Http.HttpContext)

Process an individual request.

Return type:System.Threading.Tasks.Task
public Task Invoke(HttpContext context)