问题描述
我已经安装了 ASP.NET Core 2.1
,但是即使我使用 ASP.NET Core 2.1 创建了一个新的
ASP.NET Core Web应用程序
带有个人用户帐户
→在应用内存储用户帐户
的code>我找不到AccountController或Views.
I have installed ASP.NET Core 2.1
but even though I have created a new ASP.NET Core Web Application
using ASP.NET Core 2.1
with Individual User Accounts
→ Store user accounts in-app
I can't find the AccountController or Views.
我仍然可以毫无问题地注册和登录,但是我找不到它的代码,它存在于2.0中.
I can still register and login without a problem but I can't find the code for it, it were present in 2.0.
推荐答案
2.1的更改是Razor类库,默认标识位于各个身份验证模板中的其中一个中.如果您希望将代码包含在应用程序中以便自定义代码,则可以使用Visual Studio或全局脚手架工具将其脚手架固定.请参见有关这两种方法的指南.
One of the changes in 2.1 was Razor Class Libraries and the default identity lives in one of these in the individual auth templates. If you would like to have the code in your app so you can customise it, you can scaffold it out with Visual Studio, or with the global scaffolder tool. See this guide on how to do both.
这篇关于ASP.Net Core 2.1中的身份<-自定义AccountController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!