Identity in ASP.Net Core 2.1 : Customize AccountController

后端 未结 6 2249
别那么骄傲
别那么骄傲 2020-11-30 22:30

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

6条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 22:54

    As far as I am aware, the AccountController code has been moved to Razor pages (and their code behinds) and works best using defaults so to customise the code you can Scaffold (ie create the files in the right place) from a brand new Net Core 2.1 project by right-clicking the Project in Visual Studio 2017 and seleting Add => New Scaffolded Item => Identity which opens a Select Dialog. Choose desired pages and there you go. Just change the pages you want and copy to same place in an Identity enabled project as these new pages automatically override the defaults. This is the new way to customize authentication/authorization using Identity not sure whether many consider this significant progress!

提交回复
热议问题