Generally when creating a page in SharePoint it inheritance from LayoutsPageBase, however a public page has to inheritance from UnsecuredLayoutsPageBase and overriding AllowAnonymousAccess property.

public partial class ForgotPassword: UnsecuredLayoutsPageBase
{
    protected override boolAllowAnonymousAccess { get{ return true; } }
 
    protected void Page_Load(objectsender, EventArgs e)
    {
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation