Search code examples
c#asp.net-identityblazor-server-side

NavigationManager redirect to Identity cshtml not working properly


I have a login button, which should redirect me to the Login form of asp.net identity

So I have a button with:
Click="@(_ => _navigationManager.NavigateTo("/Identity/Account/Login"))"

But when I click it, the url in the browser changes but I'm getting a 404 error. Now, when I do a reload with F5 the login form appears.
Why is that?


Solution

  • Click="@(_ => _navigationManager.NavigateTo("/Identity/Account/Login", true))"
    

    there is an overload which allowes for force reload!