In a brand new out-of-the-box asp.net core RazorPages project, why does the following result in the exception "InvalidOperationException: No page named '/' matches the supplied values"?
public IActionResult OnPost()
{
return RedirectToPage("/");
}
I would expect it to redirect to /Index. RedirectToPage("") and RedirectToPage("Index") work as expected, but in this case I'm being passed a return url of "/". I know I could just check for "/" and replace it with "" but it seems like this should work.