Anonymous Access SharePoint Application Page
Thursday, October 27th, 2011 by Yuri Panshin
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)
{
}
}