Adding link to Lockout page RRS feed

  • Question

  • 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:
    <p>This account has been locked out.</p>
    <p>Click <a href="SendEmail.cshtml"  >here</a> to contact support.</p>

    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

    Monday, April 22, 2019 1:50 PM


  • User148055990 posted

    Thank You

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 22, 2019 3:14 PM

All replies