DatabaseErrorPageExtensions.UseDatabaseErrorPage 方法

定义

重载

UseDatabaseErrorPage(IApplicationBuilder)
已过时.

从管道中捕获可使用 Entity Framework 迁移解决的同步和异步数据库相关异常。 当这些异常出现时,便会生成 HTML 响应,其中包含用于解决问题的可能操作的详细信息。

UseDatabaseErrorPage(IApplicationBuilder, DatabaseErrorPageOptions)
已过时.

从管道中捕获可使用 Entity Framework 迁移解决的同步和异步数据库相关异常。 当这些异常出现时,便会生成 HTML 响应,其中包含用于解决问题的可能操作的详细信息。

UseDatabaseErrorPage(IApplicationBuilder)

Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs

注意

This is obsolete and will be removed in a future version. Use DatabaseDeveloperPageExceptionFilter instead, see documentation at https://aka.ms/DatabaseDeveloperPageExceptionFilter.

从管道中捕获可使用 Entity Framework 迁移解决的同步和异步数据库相关异常。 当这些异常出现时,便会生成 HTML 响应,其中包含用于解决问题的可能操作的详细信息。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDatabaseErrorPage(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDatabaseErrorPage (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
[System.Obsolete("This is obsolete and will be removed in a future version. Use DatabaseDeveloperPageExceptionFilter instead, see documentation at https://aka.ms/DatabaseDeveloperPageExceptionFilter.")]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDatabaseErrorPage (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseDatabaseErrorPage : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("This is obsolete and will be removed in a future version. Use DatabaseDeveloperPageExceptionFilter instead, see documentation at https://aka.ms/DatabaseDeveloperPageExceptionFilter.")>]
static member UseDatabaseErrorPage : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDatabaseErrorPage (app As IApplicationBuilder) As IApplicationBuilder

参数

app
IApplicationBuilder

IApplicationBuilder要注册中间件的 。

返回

同一 IApplicationBuilder 实例,以便可以链接多个调用。

属性

适用于

UseDatabaseErrorPage(IApplicationBuilder, DatabaseErrorPageOptions)

Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs
Source:
DatabaseErrorPageExtensions.cs

注意

This is obsolete and will be removed in a future version. Use DatabaseDeveloperPageExceptionFilter instead, see documentation at https://aka.ms/DatabaseDeveloperPageExceptionFilter.

从管道中捕获可使用 Entity Framework 迁移解决的同步和异步数据库相关异常。 当这些异常出现时,便会生成 HTML 响应,其中包含用于解决问题的可能操作的详细信息。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDatabaseErrorPage(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::DatabaseErrorPageOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDatabaseErrorPage (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions options);
[System.Obsolete("This is obsolete and will be removed in a future version. Use DatabaseDeveloperPageExceptionFilter instead, see documentation at https://aka.ms/DatabaseDeveloperPageExceptionFilter.")]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDatabaseErrorPage (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions options);
static member UseDatabaseErrorPage : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("This is obsolete and will be removed in a future version. Use DatabaseDeveloperPageExceptionFilter instead, see documentation at https://aka.ms/DatabaseDeveloperPageExceptionFilter.")>]
static member UseDatabaseErrorPage : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDatabaseErrorPage (app As IApplicationBuilder, options As DatabaseErrorPageOptions) As IApplicationBuilder

参数

app
IApplicationBuilder

IApplicationBuilder要注册中间件的 。

options
DatabaseErrorPageOptions

一个 DatabaseErrorPageOptions ,它指定中间件的选项。

返回

同一 IApplicationBuilder 实例,以便可以链接多个调用。

属性

适用于