简体   繁体   中英

.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.

在此处输入图像描述

在此处输入图像描述

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

在此处输入图像描述

The links look default and I haven't changed them. 在此处输入图像描述

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM