I have the following route set up
[HttpGet("bar")]
public IActionResult Foo()
When I access the website with "/bar", I am directed to Foo
, as expected.
However, if I try to redirect to "bar", I get an error:
public async Task<IActionResult> Index()
{
return RedirectToRoute("bar");
}
No route matches the supplied values RedirectToRoute
Why is RedirectToRoute
not working?