SharePoint Application Page – Anonymous Access

Ever felt the need of having an anonymous application page in SharePoint??

I guess everybody will agree that at some point or the other they all have felt the need for the same…

So here how we go about it

Use the UnsecuredLayoutsPageBase as a base class for the application pages to which even unauthenticated users must have access, such as a login page.

Additionally you need to override one more method AllowAnonymousAccess to return true and you are all set

Following is a code snippet for the implementation

public class MyApplicationPage :  Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase

  protected override bool AllowAnonymousAccess 
          return true; 


Safeguarded Application Pages

Following is the list of Safe Guarded application pages in SharePoint 2010. These application pages are special in the sense if the custom master page applied to these pages gets broken then they resort to the application master page in the _layouts directory…pretty cool haa…

  • AccessDenied.aspx
  • MngSiteAdmin.aspx
  • People.aspx
  • RecycleBin.aspx
  • ReGhost.aspx
  • ReqAcc.aspx
  • Settings.aspx
  • UserDisp.aspx
  • ViewLsts.aspx