共用方式為


StatusCodePagesExtensions.UseStatusCodePages 方法

定義

多載

UseStatusCodePages(IApplicationBuilder)

使用預設回應處理常式新增 StatusCodePages 中介軟體,以檢查狀態碼介於 400 到 599 之間沒有主體的回應。

UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions)

使用指定的選項新增 StatusCodePages 中介軟體,以檢查狀態碼在 400 到 599 之間沒有本文的回應。

UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>)

使用指定的替代中介軟體管線,將 StatusCodePages 中介軟體新增至管線,以執行 以產生回應本文。

UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>)

使用指定的處理常式新增 StatusCodePages 中介軟體,以檢查狀態碼介於 400 到 599 之間沒有主體的回應。

UseStatusCodePages(IApplicationBuilder, String, String)

新增具有要傳送之指定回應本文的 StatusCodePages 中介軟體。 這可能包括狀態碼的 ' {0} ' 預留位置。 中介軟體會檢查狀態碼介於 400 到 599 之間沒有主體的回應。

UseStatusCodePages(IApplicationBuilder)

來源:
StatusCodePagesExtensions.cs
來源:
StatusCodePagesExtensions.cs
來源:
StatusCodePagesExtensions.cs

使用預設回應處理常式新增 StatusCodePages 中介軟體,以檢查狀態碼介於 400 到 599 之間沒有主體的回應。

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

參數

傳回

適用於

UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions)

來源:
StatusCodePagesExtensions.cs
來源:
StatusCodePagesExtensions.cs
來源:
StatusCodePagesExtensions.cs

使用指定的選項新增 StatusCodePages 中介軟體,以檢查狀態碼在 400 到 599 之間沒有本文的回應。

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

參數

傳回

適用於

UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>)

來源:
StatusCodePagesExtensions.cs
來源:
StatusCodePagesExtensions.cs
來源:
StatusCodePagesExtensions.cs

使用指定的替代中介軟體管線,將 StatusCodePages 中介軟體新增至管線,以執行 以產生回應本文。

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

參數

configuration
Action<IApplicationBuilder>

傳回

適用於

UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>)

來源:
StatusCodePagesExtensions.cs
來源:
StatusCodePagesExtensions.cs
來源:
StatusCodePagesExtensions.cs

使用指定的處理常式新增 StatusCodePages 中介軟體,以檢查狀態碼介於 400 到 599 之間沒有主體的回應。

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

參數

傳回

適用於

UseStatusCodePages(IApplicationBuilder, String, String)

來源:
StatusCodePagesExtensions.cs
來源:
StatusCodePagesExtensions.cs
來源:
StatusCodePagesExtensions.cs

新增具有要傳送之指定回應本文的 StatusCodePages 中介軟體。 這可能包括狀態碼的 ' {0} ' 預留位置。 中介軟體會檢查狀態碼介於 400 到 599 之間沒有主體的回應。

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

參數

contentType
String
bodyFormat
String

傳回

適用於