More Specificity on How To Delete your existing Identity code.
A link to an article on how to delete your Identity code, specifically from a previously scaffolded/created app that had Identity added on creation of a Core 2.0 App would be extremely helpful.
It can be daunting to try to identity exactly WHICH files need to be deleted and which can be kept.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 4fa0f562-bdf0-eeea-f076-0c3e05222f75
- Version Independent ID: 8269d917-3b32-1607-71da-c756d4d7ad32
- Content: Migrate from ASP.NET MVC to ASP.NET Core MVC
- Content Source: aspnetcore/migration/20_21.md
- Service: unspecified
- Product: asp.net-core
- GitHub Login: @Rick-Anderson
- Microsoft Alias: riande
@brinehart you could do a diff on a 2.0 project with/without individual user accounts.
If you already have a login system implemented, you could delete all the references and folders like Manage and Account. Then you add the new identity as described here. The best would probably be to create a different dbcontext for the new identity then you don't need to change much in your original db and the identity would be totally separate from the rest of your stuff.
how about migrating identity 2.0 to 2.1? We have many custom changes...
@HaoK do we need an article on migrating identity 2.0 to 2.1?
I mean they should be fine not changing anything... there's no requirement to switch to using the default UI, it doesn't give them any new features, if they customized identity I would suggest they just leave it alone, rather than try to migrate to default identity
Perhaps its worth mentioning that in the docs, they aren't gaining any major new functionality moving to default identity if they already have a working app.
@HaoK how about something like:
The default UI doesn't currently provide significant new features. Replacing Identity with the RCL package is optional. The advantages to replacing the template generated Identity code with the RCL version include:
- Many files are moved out of your source tree.
- Any bug fixes or new features to Identity come with the M.A.App package. You automatically get the updated Identity when M.A.App is updated.
See #6953
I'm also confused by the code snippet from _LoginPartial.cshtml:
<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">Log in</a></li>
</ul>
When I generate a new ASP.NET Core Web Application using 2.1 I get:
<ul class="nav navbar-nav navbar-right">
<li><a asp-area="AzureAD" asp-controller="Account" asp-action="SignIn">Sign in</a></li>
</ul>
The are is "AzureAD" and not "Identity".
I'm confused.
@olavt can you create a project with the following:
dotnet new webapp --auth Individual -o MyTest
Make sure you've got the latest release .NET Core SDK `dotnet --version``
@Rick-Anderson
dotnet new webapp --auth Individual -o MyTest
Ok, then I get the asp-are="Identity" rather than asp-area="AzureAD".
But, the article does not state what kind of ASP.NET Core 2.0 to 2.1 projects we are using as an example here. If you have a 2.0 application with Azure AD authentication it looks slightly different.
I think this should be clearer.
@olavt it's always the default.
This issue documents the process for those who need more info.