SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 5 down vote accepted

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

share|improve this answer
    
thanks bagus.it worked. – ARD Jan 6 '12 at 12:58

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.

share|improve this answer
1  
but before you should configure anonymous access as @bagusilman said. – Alexander Jan 5 '12 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()
share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.