Skip to main content
added 438 characters in body
Source Link

Using Visual Studio you can give your CustomAnonymous Access Sharepoint 2013 Custom Appliaction Page -

Step-1 : Open the Central Admin and go to Manage Web Application (under Application Management) .

Step-2 : Choose the Web Application you want Anonymous Access for and click on Authentication Provider .

Edit Your Code By Changing the enter image description here

Click Default

enter image description here

Step-3 : Check Anonymous Access & Click OK .

enter image description here

Step-4 : Open Visual Studio ,create New Sharepoint Project and add Application Page in it .

Step-5 : Now remove public partial classDynamicMasterPageFile="~masterurl/default.master" as belowfrom aspx page . enter image description here

Step-6 : Change the Code in aspx.cs to UnsecuredLayoutsPageBase as below

using System;    
using System.Web.UI;    
using Microsoft.SharePoint;    

namespace Custom.Layouts.Custom    
{       
 public partial class MyPagePageName : UnsecuredLayoutsPageBase       
  
{           
       
protected override bool AllowAnonymousAccess            
      {               
            get               
            {    
                return true;
            }
        }    get
        protected void Page_Load(object sender, EventArgs e)
        {

           //Ur code goesreturn heretrue;

        }     

    }
}

Also if you want to remove default Sharepoint Footer & Header ,kindly Remove DynamicMasterPageFile="masterurl/default.master" as below screenshot -enter image description here

enter image description here Step-7 : Open the Page in Browser (No Login Pop-up will come). enter image description here

Using Visual Studio you can give your Custom Sharepoint Page Anonymous Access .

Edit Your Code By Changing the public partial class as below -

using System;    
using System.Web.UI;    
using Microsoft.SharePoint;    

namespace Custom.Layouts.Custom    
{       
 public partial class MyPage : UnsecuredLayoutsPageBase       
 {           
      protected override bool AllowAnonymousAccess            
      {               
            get               
            {    
                return true;
            }
        }    
        protected void Page_Load(object sender, EventArgs e)
        {

           //Ur code goes here

        }    
    }
}

Also if you want to remove default Sharepoint Footer & Header ,kindly Remove DynamicMasterPageFile="masterurl/default.master" as below screenshot -

enter image description here

Anonymous Access Sharepoint 2013 Custom Appliaction Page -

Step-1 : Open the Central Admin and go to Manage Web Application (under Application Management) .

Step-2 : Choose the Web Application you want Anonymous Access for and click on Authentication Provider .

enter image description here

Click Default

enter image description here

Step-3 : Check Anonymous Access & Click OK .

enter image description here

Step-4 : Open Visual Studio ,create New Sharepoint Project and add Application Page in it .

Step-5 : Now remove DynamicMasterPageFile="~masterurl/default.master" from aspx page . enter image description here

Step-6 : Change the Code in aspx.cs to UnsecuredLayoutsPageBase as below

public partial class PageName : UnsecuredLayoutsPageBase
 
{
     
protected override bool AllowAnonymousAccess

    {

        get

        {

            return true;

        } 

    }

enter image description here

Step-7 : Open the Page in Browser (No Login Pop-up will come). enter image description here

added 99 characters in body
Source Link

Using Visual Studio you can give your Custom Sharepoint Page Anonymous Access .

Edit Your Code By Changing the public partial class as below -

using System;    
using System.Web.UI;    
using Microsoft.SharePoint;    

namespace Custom.Layouts.Custom    
{       
 public partial class MyPage : UnsecuredLayoutsPageBase       
 {           
      protected override bool AllowAnonymousAccess            
      {               
            get               
            {    
                return true;
            }
        }    
        protected void Page_Load(object sender, EventArgs e)
        {

           //Ur code goes here

        }    
    }
}

Also if you want to remove default Sharepoint Footer & Header ,kindly Remove DynamicMasterPageFile="masterurl/default.master" as below screenshot -

enter image description here

Using Visual Studio you can give your Custom Sharepoint Page Anonymous Access .

Edit Your Code By Changing the public partial class as below -

using System;    
using System.Web.UI;    
using Microsoft.SharePoint;    

namespace Custom.Layouts.Custom    
{       
 public partial class MyPage : UnsecuredLayoutsPageBase       
 {           
      protected override bool AllowAnonymousAccess            
      {               
            get               
            {    
                return true;
            }
        }    
        protected void Page_Load(object sender, EventArgs e)
        {

        }    
    }
}

Also Remove DynamicMasterPageFile="masterurl/default.master" as below screenshot -

enter image description here

Using Visual Studio you can give your Custom Sharepoint Page Anonymous Access .

Edit Your Code By Changing the public partial class as below -

using System;    
using System.Web.UI;    
using Microsoft.SharePoint;    

namespace Custom.Layouts.Custom    
{       
 public partial class MyPage : UnsecuredLayoutsPageBase       
 {           
      protected override bool AllowAnonymousAccess            
      {               
            get               
            {    
                return true;
            }
        }    
        protected void Page_Load(object sender, EventArgs e)
        {

           //Ur code goes here

        }    
    }
}

Also if you want to remove default Sharepoint Footer & Header ,kindly Remove DynamicMasterPageFile="masterurl/default.master" as below screenshot -

enter image description here

Using Visual Studio you can give your Custom Sharepoint Page Anonymous Access .

Edit Your Code By Changing the public partial class as below -

enterusing codeSystem; here   

using System;

using System.Web.UI;

using Microsoft.SharePoint;

namespace Custom.Layouts.Custom

{

public partial class MyPage : UnsecuredLayoutsPageBase

{

protected override bool AllowAnonymousAccess

{

get

{

using System.Web.UI;    
using Microsoft.SharePoint;    

namespace Custom.Layouts.Custom    
{       
 public partial class MyPage : UnsecuredLayoutsPageBase       
 {           
      protected override bool AllowAnonymousAccess            
      {               
            get               
            {    
                return true;
            }
        }
     
        protected void Page_Load(object sender, EventArgs e)
        {

        }    
    }
}

}

Also Remove DynamicMasterPageFile="masterurl/default.master" as below screenshot -

enter image description here

Using Visual Studio you can give your Custom Sharepoint Page Anonymous Access .

Edit Your Code By Changing the public partial class as below -

enter code here

using System;

using System.Web.UI;

using Microsoft.SharePoint;

namespace Custom.Layouts.Custom

{

public partial class MyPage : UnsecuredLayoutsPageBase

{

protected override bool AllowAnonymousAccess

{

get

{

            return true;
        }
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {

    }

}

}

Also Remove DynamicMasterPageFile="masterurl/default.master" as below screenshot -

enter image description here

Using Visual Studio you can give your Custom Sharepoint Page Anonymous Access .

Edit Your Code By Changing the public partial class as below -

using System;    
using System.Web.UI;    
using Microsoft.SharePoint;    

namespace Custom.Layouts.Custom    
{       
 public partial class MyPage : UnsecuredLayoutsPageBase       
 {           
      protected override bool AllowAnonymousAccess            
      {               
            get               
            {    
                return true;
            }
        }    
        protected void Page_Load(object sender, EventArgs e)
        {

        }    
    }
}

Also Remove DynamicMasterPageFile="masterurl/default.master" as below screenshot -

enter image description here

Source Link
Loading