Search code examples
.net-coreasp.net-identityasp.net-mvc-partialview

.net 6 MVC Razor site - loginPartial links don't open the page, routing issue? How can I fix this?


Basic site from the create project wizard, I added the Identity scaffold like I have done in the past.

Added the partial to include the _LoginPartial on my template nav bar. However, the links don't open the page.

enter image description here

enter image description here

It stays on the current page and the Areas are there.

enter image description here

The links look default and I haven't changed them. enter image description here

If I go to /Identity/Account/Login it renders a 404. Is there any special routing I need to do? I thought it does this automatically.


Solution

  • Have to add app.MapRazorPages(); to the Program.cs

    The app is not smart enough to add when adding the Identity scaffold to the application.