How to understand why FallbackRoute doesn't work

I’ve added a Service, that has 1 Any() method, that uses a DTO with FallbackRoute attribute.

public class HomeService : AppService
{
    public object Any(Fallback fallback)
    {
        // do things
    }
}

[FallbackRoute("/{Path*}")]
public class Fallback
{
    public string Path { get; set; }
}

I have 2 issues:

  • I can’t get any call to get to my method (it just gives me 404)
  • If I try to get to http://localhost/ I get a 302 to the /metadata page.

Can you help me understand why this happens, and\or how I can investigate this issue?
Thanks

All SPA templates have the same fallback path in all hosts:

There must be something else causing the conflict, like all things look at the raw HTTP Headers to see if they provide any insight on what’s causing it.

I’m sorry, our GetRouteAttributes override was modifying the fallback path.

1 Like