[英].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.创建项目向导中的基本站点,我像过去一样添加了 Identity 脚手架。
Added the partial to include the _LoginPartial on my template nav bar.添加部分以在我的模板导航栏上包含 _LoginPartial。 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?如果我将 go 转到 /Identity/Account/Login,它会呈现 404。我需要做任何特殊的路由吗? I thought it does this automatically.
我认为它会自动执行此操作。
Have to add app.MapRazorPages();必须添加 app.MapRazorPages(); to the Program.cs
到 Program.cs
The app is not smart enough to add when adding the Identity scaffold to the application.将身份脚手架添加到应用程序时,应用程序不够智能,无法添加。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.