Op Englesch liesen

Deelen iwwer


StatusCodePagesExtensions.UseStatusCodePages Method

Definition

Overloads

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)

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>)

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>)

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)

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)

Source:
StatusCodePagesExtensions.cs
Source:
StatusCodePagesExtensions.cs
Source:
StatusCodePagesExtensions.cs

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.

C#
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);

Parameters

Returns

Applies to

ASP.NET Core 9.0 an aner Versiounen
Produkt Versiounen
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions)

Source:
StatusCodePagesExtensions.cs
Source:
StatusCodePagesExtensions.cs
Source:
StatusCodePagesExtensions.cs

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.

C#
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.StatusCodePagesOptions options);

Parameters

Returns

Applies to

ASP.NET Core 9.0 an aner Versiounen
Produkt Versiounen
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>)

Source:
StatusCodePagesExtensions.cs
Source:
StatusCodePagesExtensions.cs
Source:
StatusCodePagesExtensions.cs

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

C#
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> configuration);

Parameters

configuration
Action<IApplicationBuilder>

Returns

Applies to

ASP.NET Core 9.0 an aner Versiounen
Produkt Versiounen
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>)

Source:
StatusCodePagesExtensions.cs
Source:
StatusCodePagesExtensions.cs
Source:
StatusCodePagesExtensions.cs

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.

C#
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Func<Microsoft.AspNetCore.Diagnostics.StatusCodeContext,System.Threading.Tasks.Task> handler);

Parameters

Returns

Applies to

ASP.NET Core 9.0 an aner Versiounen
Produkt Versiounen
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

UseStatusCodePages(IApplicationBuilder, String, String)

Source:
StatusCodePagesExtensions.cs
Source:
StatusCodePagesExtensions.cs
Source:
StatusCodePagesExtensions.cs

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.

C#
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string contentType, string bodyFormat);

Parameters

contentType
String
bodyFormat
String

Returns

Applies to

ASP.NET Core 9.0 an aner Versiounen
Produkt Versiounen
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0