Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

DatabaseErrorPageExtensions.UseDatabaseErrorPage Method

Definition

Namespace:
Microsoft.AspNetCore.Builder
Assembly:
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.dll
Package:
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v10.0.0
Package:
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v3.0.3
Package:
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v3.1.18
Package:
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v5.0.9
Package:
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v6.0.6
Package:
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v7.0.5
Package:
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v8.0.19
Package:
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v9.0.8

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Name Description
UseDatabaseErrorPage(IApplicationBuilder)
Obsolete.

Captures synchronous and asynchronous database related exceptions from the pipeline that may be resolved using Entity Framework migrations. When these exceptions occur, an HTML response with details of possible actions to resolve the issue is generated.

UseDatabaseErrorPage(IApplicationBuilder, DatabaseErrorPageOptions)
Obsolete.

Captures synchronous and asynchronous database related exceptions from the pipeline that may be resolved using Entity Framework migrations. When these exceptions occur, an HTML response with details of possible actions to resolve the issue is generated.

UseDatabaseErrorPage(IApplicationBuilder)

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

Caution

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

Captures synchronous and asynchronous database related exceptions from the pipeline that may be resolved using Entity Framework migrations. When these exceptions occur, an HTML response with details of possible actions to resolve the issue is generated.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDatabaseErrorPage(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);
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.")>]
static member UseDatabaseErrorPage : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
static member UseDatabaseErrorPage : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDatabaseErrorPage (app As IApplicationBuilder) As IApplicationBuilder

Parameters

app
IApplicationBuilder

The IApplicationBuilder to register the middleware with.

Returns

The same IApplicationBuilder instance so that multiple calls can be chained.

Attributes

Applies to

UseDatabaseErrorPage(IApplicationBuilder, DatabaseErrorPageOptions)

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

Caution

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

Captures synchronous and asynchronous database related exceptions from the pipeline that may be resolved using Entity Framework migrations. When these exceptions occur, an HTML response with details of possible actions to resolve the issue is generated.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDatabaseErrorPage(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);
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.")>]
static member UseDatabaseErrorPage : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
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

Parameters

app
IApplicationBuilder

The IApplicationBuilder to register the middleware with.

options
DatabaseErrorPageOptions

A DatabaseErrorPageOptions that specifies options for the middleware.

Returns

The same IApplicationBuilder instance so that multiple calls can be chained.

Attributes

Applies to


Feedback

Was this page helpful?