I have an asp net core solution with identity which I thought I had removed the section of code that included these login page links: Forgot Password, Register as a New User, Resend Email Confirmation and Use Another Service to Login (text & link) But this content is displayed and I can't figure out why?
I have 'marked' the last line of ~\repo\Views\Shared\_LoginPartial.cshtml
The code:
@using Microsoft.AspNetCore.Identity
@inject SignInManager<IdentityUser> SignInManager
@inject UserManager<IdentityUser> UserManager
<ul class="navbar-nav">
@if (SignInManager.IsSignedIn(User))
{
<li class="nav-item">
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Kia Ora/Welcome @User.Identity.Name</a>
</li>
<li class="nav-item">
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Action("Index", "Home", new { area = "" })">
<button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
</form>
</li>
}
else
{
<li class="nav-item">
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login"></a>
</li>
}
<!-- LoginPartial.cshtml file ends here-->
</ul>
When I launch the app using localhost, the login page has all the links, as though I never removed them. This can be seen looking at the page using Developer Tools (right-click image "Open image in new tab"
There are other repo folders, in the parent folder, with different versions. But I have been careful to open this folder in Visual Studio and double click on solutions file. There are no resources outside of this folder. How can this happen?
I believe the bootstrap container code and the HTML role attribute don't give any clues. I could be wrong.