HostingAbstractionsWebHostBuilderExtensions.CaptureStartupErrors(IWebHostBuilder, Boolean) HostingAbstractionsWebHostBuilderExtensions.CaptureStartupErrors(IWebHostBuilder, Boolean) HostingAbstractionsWebHostBuilderExtensions.CaptureStartupErrors(IWebHostBuilder, Boolean) Method

Definition

Set whether startup errors should be captured in the configuration settings of the web host. When enabled, startup exceptions will be caught and an error page will be returned. If disabled, startup exceptions will be propagated.

public static Microsoft.AspNetCore.Hosting.IWebHostBuilder CaptureStartupErrors (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, bool captureStartupErrors);
static member CaptureStartupErrors : Microsoft.AspNetCore.Hosting.IWebHostBuilder * bool -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function CaptureStartupErrors (hostBuilder As IWebHostBuilder, captureStartupErrors As Boolean) As IWebHostBuilder

Parameters

captureStartupErrors
Boolean Boolean Boolean

true to use startup error page; otherwise false.

Returns

Applies to