共用方式為


RouteHandlerOptions.ThrowOnBadRequest 屬性

定義

控制端點是否在處理不正確要求時,除了寫入 Debug 記錄檔之外,是否應該擲 BadHttpRequestException 回 。

public bool ThrowOnBadRequest { get; set; }
member this.ThrowOnBadRequest : bool with get, set
Public Property ThrowOnBadRequest As Boolean

屬性值

備註

預設值為 IsDevelopment(IHostEnvironment)

適用於