StatusCodePagesExtensions.UseStatusCodePages StatusCodePagesExtensions.UseStatusCodePages StatusCodePagesExtensions.UseStatusCodePages Method

Definition

Overloads

UseStatusCodePages(IApplicationBuilder) UseStatusCodePages(IApplicationBuilder) UseStatusCodePages(IApplicationBuilder)

Adds a StatusCodePages middleware with a default response handler that checks for responses with status codes between 400 and 599 that do not have a body.

UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions) UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions) UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions)

Adds a StatusCodePages middleware with the given options that checks for responses with status codes between 400 and 599 that do not have a body.

UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>) UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>) UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>)

Adds a StatusCodePages middleware to the pipeline with the specified alternate middleware pipeline to execute to generate the response body.

UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>) UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>) UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>)

Adds a StatusCodePages middleware with the specified handler that checks for responses with status codes between 400 and 599 that do not have a body.

UseStatusCodePages(IApplicationBuilder, String, String) UseStatusCodePages(IApplicationBuilder, String, String) UseStatusCodePages(IApplicationBuilder, String, String)

Adds a StatusCodePages middleware with the specified response body to send. This may include a '{0}' placeholder for the status code. The middleware checks for responses with status codes between 400 and 599 that do not have a body.

UseStatusCodePages(IApplicationBuilder) UseStatusCodePages(IApplicationBuilder) UseStatusCodePages(IApplicationBuilder)

Adds a StatusCodePages middleware with a default response handler that checks for responses with status codes between 400 and 599 that do not have a body.

public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseStatusCodePages : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseStatusCodePages (app As IApplicationBuilder) As IApplicationBuilder
Parameters
Returns

UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions) UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions) UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions)

Adds a StatusCodePages middleware with the given options that checks for responses with status codes between 400 and 599 that do not have a body.

public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.StatusCodePagesOptions options);
static member UseStatusCodePages : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.StatusCodePagesOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseStatusCodePages (app As IApplicationBuilder, options As StatusCodePagesOptions) As IApplicationBuilder
Parameters
Returns

UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>) UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>) UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>)

Adds a StatusCodePages middleware to the pipeline with the specified alternate middleware pipeline to execute to generate the response body.

public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> configuration);
static member UseStatusCodePages : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseStatusCodePages (app As IApplicationBuilder, configuration As Action(Of IApplicationBuilder)) As IApplicationBuilder
Parameters
configuration
Action<IApplicationBuilder>
Returns

UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>) UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>) UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>)

Adds a StatusCodePages middleware with the specified handler that checks for responses with status codes between 400 and 599 that do not have a body.

public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Func<Microsoft.AspNetCore.Diagnostics.StatusCodeContext,System.Threading.Tasks.Task> handler);
static member UseStatusCodePages : Microsoft.AspNetCore.Builder.IApplicationBuilder * Func<Microsoft.AspNetCore.Diagnostics.StatusCodeContext, System.Threading.Tasks.Task> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseStatusCodePages (app As IApplicationBuilder, handler As Func(Of StatusCodeContext, Task)) As IApplicationBuilder
Parameters
Returns

UseStatusCodePages(IApplicationBuilder, String, String) UseStatusCodePages(IApplicationBuilder, String, String) UseStatusCodePages(IApplicationBuilder, String, String)

Adds a StatusCodePages middleware with the specified response body to send. This may include a '{0}' placeholder for the status code. The middleware checks for responses with status codes between 400 and 599 that do not have a body.

public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string contentType, string bodyFormat);
static member UseStatusCodePages : Microsoft.AspNetCore.Builder.IApplicationBuilder * string * string -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseStatusCodePages (app As IApplicationBuilder, contentType As String, bodyFormat As String) As IApplicationBuilder
Parameters
contentType
String String String
bodyFormat
String String String
Returns

Applies to