User148055990 posted
Hi, I'm using asp.net core 2.2 with Identity.
I'd like to add an email link to the lockout page that is displayed when a user fails to login successfully. Something like click here to contact support.
This should show a form that allows the user to enter their username and email address.
This is the lockout.cshtml page:
<header>
<h1>@ViewData["Title"]</h1>
<p>This account has been locked out.</p>
<p>Click <a href="SendEmail.cshtml" >here</a> to contact support.</p>
</header>
The link above resolves to Identity/Account/SendEmail.cshtml which is not found although SendEmail.cshtml is in the folder Areas/Identity/Account
I've tried adding a folder 'Email' under Areas/Identity/Account which contains SendEmail.cshtml but that too is not found
I've tried putting the page in the same place as lockout.cshtml (which is Identity/Pages/ ) and it is not found there.
I've also tried creating a folder 'Email' and putting that in the root Pages directory but it is not found there with the link /Pages/Email/SendEmail.
I really wanted to us the tag helper asp-page="/Pages/Email/SendEmail" but it was not found there.
I tried modifying Startup.cs and adding the line
options.Conventions.AuthorizeAreaFolder("Identity", "/Account/Manage/Email"); to hopefully reach a folder named Email under Areas/Identity or
options.Conventions.AuthorizeAreaFolder("Identity", "/Account/Manage/Pages/Email"); to reach a folder named Email under Areas/Identity/Pages
all of which haven't worked.
Can anyone suggest how I can resolve this please.
Many thanks