I have a SharePoint site which contains two pages. I don't want to enable anonymous access for the home page of this site but I do want to do it for the other pages it contains. How is this done?
4 Answers
You can enable Anonymous Access by going to Application Management in Central Administration, Highlight the WebApp where you want to enable Anonymous Authentication, Click on Authentication Providers, Click on the Zone where you want to enable Anonymous Access, then Check Enable Anonymous Access, Save.
Go to your Web Application and the top level of the site collection > Site Actions > Site Settings > Site Permissions > Anonymous Access > List and Library
After that you can set each of your page to give anonymous user permission to read your page
This link has a the above walkthrough with screen shots
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 .
Click Default
Step-3 : Check Anonymous Access & Click OK .
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 .
Step-6 : Change the Code in aspx.cs to UnsecuredLayoutsPageBase as below
public partial class PageName : UnsecuredLayoutsPageBase
{
protected override bool AllowAnonymousAccess
{
get
{
return true;
}
}
Step-7 : Open the Page in Browser (No Login Pop-up will come).
You can go to site pages library, select this page and open list item permission settings. In this settings you can breake role inheritance and remove anonymous access from this list item.
-
1but before you should configure anonymous access as @bagusilman said. Commented Jan 5, 2012 at 10:19
This can be done through PS script as well
$web = Get-SPWeb "http://siteURL"
$web.AnonymousState = [Microsoft.SharePoint.SPWeb+WebAnonymousState]::Enabled
$web.AnonymousPermMask64 = "Open, ViewPages, ViewListItems"
$web.Update()