Error fall-back : route '{*clientRoute}' must have a string value or be of a type which implements 'Microsoft.AspNetCore.Routing.IRouteConstraint'. #1595

Closed
opened 2025-08-09 17:20:49 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @aminebizid on 5/27/2016

Hello,
I get an error when trying to fall-back

Code
` app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");

            routes.MapSpaFallbackRoute(
                name: "spa-fallback",
                defaults: new { controller = "Home", action = "Index" });

        });`

Error
The constraint entry 'clientRoute' on the route '{*clientRoute}' must have a string value or be of a type which implements 'Microsoft.AspNetCore.Routing.IRouteConstraint'.

*Originally created by @aminebizid on 5/27/2016* Hello, I get an error when trying to fall-back **Code** ` app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); ``` routes.MapSpaFallbackRoute( name: "spa-fallback", defaults: new { controller = "Home", action = "Index" }); });` ``` Error The constraint entry 'clientRoute' on the route '{*clientRoute}' must have a string value or be of a type which implements 'Microsoft.AspNetCore.Routing.IRouteConstraint'.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1595
No description provided.