StatusCodePagesExtensions Class
Definition
Extension methods for enabling StatusCodePagesMiddleware.
public ref class StatusCodePagesExtensions abstract sealed
public static class StatusCodePagesExtensions
type StatusCodePagesExtensions = class
Public Module StatusCodePagesExtensions
- Inheritance
-
StatusCodePagesExtensions
Methods
UseStatusCodePages(IApplicationBuilder) |
Adds a StatusCodePages middleware with a default response handler that checks for responses with status codes between 400 and 599 that do not have a body. |
UseStatusCodePages(IApplicationBuilder, Action<IApplicationBuilder>) |
Adds a StatusCodePages middleware to the pipeline with the specified alternate middleware pipeline to execute to generate the response body. |
UseStatusCodePages(IApplicationBuilder, Func<StatusCodeContext,Task>) |
Adds a StatusCodePages middleware with the specified handler that checks for responses with status codes between 400 and 599 that do not have a body. |
UseStatusCodePages(IApplicationBuilder, StatusCodePagesOptions) |
Adds a StatusCodePages middleware with the given options that checks for responses with status codes between 400 and 599 that do not have a body. |
UseStatusCodePages(IApplicationBuilder, String, String) |
Adds a StatusCodePages middleware with the specified response body to send. This may include a '{0}' placeholder for the status code. The middleware checks for responses with status codes between 400 and 599 that do not have a body. |
UseStatusCodePagesWithRedirects(IApplicationBuilder, String) |
Adds a StatusCodePages middleware to the pipeline. Specifies that responses should be handled by redirecting with the given location URL template. This may include a '{0}' placeholder for the status code. URLs starting with '~' will have PathBase prepended, where any other URL will be used as is. |
UseStatusCodePagesWithReExecute(IApplicationBuilder, String, String) |
Adds a StatusCodePages middleware to the pipeline. Specifies that the response body should be generated by re-executing the request pipeline using an alternate path. This path may contain a '{0}' placeholder of the status code. |