Dela via


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.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseStatusCodePages(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
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

Applies to

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.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseStatusCodePages(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::StatusCodePagesOptions ^ options);
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

Applies to

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.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseStatusCodePages(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Action<Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ configuration);
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

Applies to

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.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseStatusCodePages(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Func<Microsoft::AspNetCore::Diagnostics::StatusCodeContext ^, System::Threading::Tasks::Task ^> ^ handler);
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

Applies to

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.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseStatusCodePages(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, System::String ^ contentType, System::String ^ bodyFormat);
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
bodyFormat
String

Returns

Applies to