在Asp.Net Core 2.1中找不到帐户页面 [英] Can't find the account pages in Asp.Net Core 2.1
问题描述
我已经从Visual Studio创建了一个全新的网站,并选择了个人用户帐户"身份验证.页面_LoginPartial.cshtml
包含以下内容:
I've created a brand new site from Visual Studio, and selected "Individual User Account" authentication. The page _LoginPartial.cshtml
contains the following:
<ul class="nav navbar-nav navbar-right">
<li><a asp-area="Identity" asp-page="/Account/Register">Register</a></li>
<li><a asp-area="Identity" asp-page="/Account/Login">Login</a></li>
</ul>
该站点正常运行,并允许我导航到Register
和Account
页面;但是,我在项目中看不到那些页面.例如,我没有/Account/Register.cshtml
.我的假设是_LoginPartial
:
The site works, and allows me to navigate to the Register
and Account
pages; however, I can't see those pages in my project. I don't have, for example, a /Account/Register.cshtml
. My assumption is that the line at the top of _LoginPartial
:
@using Microsoft.AspNetCore.Identity
与此有关;但是呢?
这些页面是否是远程托管的(F12似乎没有告诉我我要离开网站),它们是否被烘焙但以某种方式隐藏了,我是否只是想念它们(如果这样,对不起!)? /p>
Are these pages hosted remotely (F12 doesn't seem to be telling me I'm leaving the site), are they baked in but hidden in some way, have I just missed them (if so, sorry!)?
推荐答案
ASP.NET Core 2.1 introduced the ability to embed views in external class libraries, and the templates are using this feature. See here for more information on how this works specifically with ASP.NET Core Identity and how to override the embedded views.
这篇关于在Asp.Net Core 2.1中找不到帐户页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!