DeveloperExceptionPageExtensions.UseDeveloperExceptionPage 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
UseDeveloperExceptionPage(IApplicationBuilder) |
从管道捕获同步和异步 Exception 实例,并生成 HTML 错误响应。 |
UseDeveloperExceptionPage(IApplicationBuilder, DeveloperExceptionPageOptions) |
从管道捕获同步和异步 Exception 实例,并生成 HTML 错误响应。 |
UseDeveloperExceptionPage(IApplicationBuilder)
从管道捕获同步和异步 Exception 实例,并生成 HTML 错误响应。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDeveloperExceptionPage(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDeveloperExceptionPage (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseDeveloperExceptionPage : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDeveloperExceptionPage (app As IApplicationBuilder) As IApplicationBuilder
参数
返回
操作完成后对 app
的引用。
注解
只能在开发环境中启用此功能。
适用于
UseDeveloperExceptionPage(IApplicationBuilder, DeveloperExceptionPageOptions)
从管道捕获同步和异步 Exception 实例,并生成 HTML 错误响应。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDeveloperExceptionPage(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::DeveloperExceptionPageOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDeveloperExceptionPage (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.DeveloperExceptionPageOptions options);
static member UseDeveloperExceptionPage : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.DeveloperExceptionPageOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDeveloperExceptionPage (app As IApplicationBuilder, options As DeveloperExceptionPageOptions) As IApplicationBuilder
参数
- options
- DeveloperExceptionPageOptions
一个 DeveloperExceptionPageOptions ,它指定中间件的选项。
返回
操作完成后对 app
的引用。
注解
只能在开发环境中启用此功能。