Share via


ControllerEndpointRouteBuilderExtensions.MapFallbackToAreaController Method

Definition

Overloads

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String)

Adds a specialized RouteEndpoint to the IEndpointRouteBuilder that will match requests for non-file-names with the lowest possible priority. The request will be routed to a controller endpoint that matches action, controller, and area.

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String)

Adds a specialized RouteEndpoint to the IEndpointRouteBuilder that will match requests for non-file-names with the lowest possible priority. The request will be routed to a controller endpoint that matches action, controller, and area.

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String)

Source:
ControllerEndpointRouteBuilderExtensions.cs

Adds a specialized RouteEndpoint to the IEndpointRouteBuilder that will match requests for non-file-names with the lowest possible priority. The request will be routed to a controller endpoint that matches action, controller, and area.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IEndpointConventionBuilder ^ MapFallbackToAreaController(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ action, System::String ^ controller, System::String ^ area);
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToAreaController (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string action, string controller, string area);
static member MapFallbackToAreaController : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * string * string -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function MapFallbackToAreaController (endpoints As IEndpointRouteBuilder, action As String, controller As String, area As String) As IEndpointConventionBuilder

Parameters

endpoints
IEndpointRouteBuilder

The IEndpointRouteBuilder to add the route to.

action
String

The action name.

controller
String

The controller name.

area
String

The area name.

Returns

Remarks

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String) is intended to handle cases where URL path of the request does not contain a file name, and no other endpoint has matched. This is convenient for routing requests for dynamic content to a SPA framework, while also allowing requests for non-existent files to result in an HTTP 404.

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String) registers an endpoint using the pattern {*path:nonfile}. The order of the registered endpoint will be int.MaxValue.

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String) does not re-execute routing, and will not generate route values based on routes defined elsewhere. When using this overload, the path route value will be available.

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String) does not attempt to disambiguate between multiple actions that match the provided action, controller, and area. If multiple actions match these values, the result is implementation defined.

Applies to

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String)

Source:
ControllerEndpointRouteBuilderExtensions.cs

Adds a specialized RouteEndpoint to the IEndpointRouteBuilder that will match requests for non-file-names with the lowest possible priority. The request will be routed to a controller endpoint that matches action, controller, and area.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IEndpointConventionBuilder ^ MapFallbackToAreaController(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ pattern, System::String ^ action, System::String ^ controller, System::String ^ area);
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToAreaController (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string action, string controller, string area);
static member MapFallbackToAreaController : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * string * string * string -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function MapFallbackToAreaController (endpoints As IEndpointRouteBuilder, pattern As String, action As String, controller As String, area As String) As IEndpointConventionBuilder

Parameters

endpoints
IEndpointRouteBuilder

The IEndpointRouteBuilder to add the route to.

pattern
String

The route pattern.

action
String

The action name.

controller
String

The controller name.

area
String

The area name.

Returns

Remarks

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String) is intended to handle cases where URL path of the request does not contain a file name, and no other endpoint has matched. This is convenient for routing requests for dynamic content to a SPA framework, while also allowing requests for non-existent files to result in an HTTP 404.

The order of the registered endpoint will be int.MaxValue.

This overload will use the provided pattern verbatim. Use the :nonfile route contraint to exclude requests for static files.

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String) does not re-execute routing, and will not generate route values based on routes defined elsewhere. When using this overload, the route values provided by matching pattern will be available.

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String) does not attempt to disambiguate between multiple actions that match the provided action, controller, and area. If multiple actions match these values, the result is implementation defined.

Applies to