StatusCodePagesExtensions.UseStatusCodePagesWithRedirects 方法

定义

将 StatusCodePages 中间件添加到管道。 指定应通过使用给定位置 URL 模板进行重定向来处理响应。 这可能包括状态代码的“”{0}占位符。 以“~”开头的 URL 将预先添加 PathBase,其中将按原样使用任何其他 URL。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseStatusCodePagesWithRedirects(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, System::String ^ locationFormat);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePagesWithRedirects (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string locationFormat);
static member UseStatusCodePagesWithRedirects : Microsoft.AspNetCore.Builder.IApplicationBuilder * string -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseStatusCodePagesWithRedirects (app As IApplicationBuilder, locationFormat As String) As IApplicationBuilder

参数

locationFormat
String

返回

适用于