0

I scaffolded all of the identity views, but they all go to the Areas folder - I would prefer if they went in my Views folder.

I moved the generated identity code to the desired Views folder, and changed \Identity\Pages\Account\Manage\_Layout.cshtml variable to /Views/Identity/Pages/_Layout.cshtml, but now it is not finding my scaffolded pages - it is just grabbing the default ones.

Can anything be done, or must the scaffolded identity views start in the Areas folder?

1 Answer 1

1

In ASP.NET Core Identity, the default Identity UI is provided as an embedded Razor Class Library (RCL) and is located in Areas/Identity/Pages. This means that when you scaffold out Identity pages, the system automatically places them in this folder so that the default pages in the RCL can be correctly overwritten during compilation.

If you do need to move pages to the Views folder, you must modify the routing and view lookup logic so that the system can find and load custom pages. This involves advanced configuration of Razor page options and file providers, which is complex and error-prone.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.