Accessing Application Page from SharePoint Anonymous Site


We can access the Application page in SharePoint anonymous site. If we do the following changes in the Application page, SharePoint won’t ask for any credentials.

·         By default, the page is inherited from LayoutsPageBase. Change the inheritance from “LayoutsPageBase” to “UnsecuredLayoutsPageBase”.
·         Next, we need to override a property of the UnsecuredLayoutsPageBase, to allow the anonymous access. Be sure to change the ‘getter’ to return true

protected override bool AllowAnonymousAccess { get { return true; } }

Example :


Reference:


Comments

Popular posts from this blog

Using External Content Types with Stored Procedures with Input Parameters

Validate a SharePoint Date Field against Current Date in Javascript