Bagikan melalui


StatusCodePagesExtensions.UseStatusCodePages Metode

Definisi

Overload

UseStatusCodePages(IApplicationBuilder)

Menambahkan middleware StatusCodePages dengan handler respons default yang memeriksa respons dengan kode status antara 400 dan 599 yang tidak memiliki isi.

UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions)

Menambahkan middleware StatusCodePages dengan opsi tertentu yang memeriksa respons dengan kode status antara 400 dan 599 yang tidak memiliki isi.

UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>)

Menambahkan middleware StatusCodePages ke alur dengan alur middleware alternatif yang ditentukan untuk dijalankan guna menghasilkan isi respons.

UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>)

Menambahkan middleware StatusCodePages dengan handler yang ditentukan yang memeriksa respons dengan kode status antara 400 dan 599 yang tidak memiliki isi.

UseStatusCodePages(IApplicationBuilder, String, String)

Menambahkan middleware StatusCodePages dengan isi respons yang ditentukan untuk dikirim. Ini mungkin termasuk tempat penampung '{0}' untuk kode status. Middleware memeriksa respons dengan kode status antara 400 dan 599 yang tidak memiliki isi.

UseStatusCodePages(IApplicationBuilder)

Sumber:
StatusCodePagesExtensions.cs
Sumber:
StatusCodePagesExtensions.cs
Sumber:
StatusCodePagesExtensions.cs

Menambahkan middleware StatusCodePages dengan handler respons default yang memeriksa respons dengan kode status antara 400 dan 599 yang tidak memiliki isi.

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

Parameter

Mengembalikan

Berlaku untuk

UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions)

Sumber:
StatusCodePagesExtensions.cs
Sumber:
StatusCodePagesExtensions.cs
Sumber:
StatusCodePagesExtensions.cs

Menambahkan middleware StatusCodePages dengan opsi tertentu yang memeriksa respons dengan kode status antara 400 dan 599 yang tidak memiliki isi.

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

Parameter

Mengembalikan

Berlaku untuk

UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>)

Sumber:
StatusCodePagesExtensions.cs
Sumber:
StatusCodePagesExtensions.cs
Sumber:
StatusCodePagesExtensions.cs

Menambahkan middleware StatusCodePages ke alur dengan alur middleware alternatif yang ditentukan untuk dijalankan guna menghasilkan isi respons.

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

Parameter

configuration
Action<IApplicationBuilder>

Mengembalikan

Berlaku untuk

UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>)

Sumber:
StatusCodePagesExtensions.cs
Sumber:
StatusCodePagesExtensions.cs
Sumber:
StatusCodePagesExtensions.cs

Menambahkan middleware StatusCodePages dengan handler yang ditentukan yang memeriksa respons dengan kode status antara 400 dan 599 yang tidak memiliki isi.

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

Parameter

Mengembalikan

Berlaku untuk

UseStatusCodePages(IApplicationBuilder, String, String)

Sumber:
StatusCodePagesExtensions.cs
Sumber:
StatusCodePagesExtensions.cs
Sumber:
StatusCodePagesExtensions.cs

Menambahkan middleware StatusCodePages dengan isi respons yang ditentukan untuk dikirim. Ini mungkin termasuk tempat penampung '{0}' untuk kode status. Middleware memeriksa respons dengan kode status antara 400 dan 599 yang tidak memiliki isi.

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

Parameter

contentType
String
bodyFormat
String

Mengembalikan

Berlaku untuk