3

I just created an ASP.NET Core 7 MVC web project with local identity in Visual Studio 2022. Once I have done the migration of the database, now I can register/login, but I am surprised I can not find identity related code files in directory Areas/Identity/Pages.

I have attached a screenshot for better understanding. Can anyone tell me where those files are located? How is this even working?

Screenshot of project

Full Screen shot

I have already tried to check hidden file but nothing exists. Any ideas?

SJj
  • 31
  • 4
  • I prefer to go to project folder and create folders physically then I add items .Probably those folders you see in this solution explorer aren't really physical folders – firatt_ Feb 27 '23 at 21:12
  • But how login system is working without those files? – SJj Feb 27 '23 at 21:15
  • RightClick on "_ViesStart.html " class and select "Open Containing Folder" you should find files out there – firatt_ Feb 27 '23 at 21:19
  • No, I tried same. No file there related to identity @firatt_ – SJj Feb 27 '23 at 21:22

1 Answers1

2

The source code for pages can be found at the github, for example the Login.cshtml (or the account management in Account/Manage/Index.cshtml). From the code (see the usage of IdentityDefaultUIAttribute for example on LoginModel in Login.cshtml.cs) and .csproj file (see the RazorGenerate tags) it seems that the Razor templates are actually compiled and distributed as part of the assembly (you can view the C# classes with decompiler).

Guru Stron
  • 102,774
  • 10
  • 95
  • 132