Saturday, December 10, 2016

Allow anonymous to access Application Page in SharePoint 2013

 In general, use UnsecuredLayoutsPageBase as a base class for pages to which even unauthenticated users must have access, such as a login page. For a page base control to which access can be limited to users who possess certain rights, use LayoutsPageBase.

public class AppPage : LayoutsPageBase

{    

    protected override bool  AllowAnonymousAccess

    {

        get

        {           

            return true;

        }

    }

}

Or Simply

public partial class MyAppPage : UnsecuredLayoutsPageBase

{

    protected void Page_Load(object sender, EventArgs e)

    {

    }

}

 

Thank you very much

          Fahadullah Karimi

         SharePoint Specialist


Step by step Creating Application page in SharePoint 2013 Using Visual Studio How to fix error "The name ‘InitializeControl’ does not exist in the current context" in Visual Web Part

No comments:

Post a Comment