{"id":1913,"date":"2011-08-22T13:53:41","date_gmt":"2011-08-22T05:53:41","guid":{"rendered":"http:\/\/www.sharepointboost.com\/blog\/?p=1913"},"modified":"2023-07-31T11:40:28","modified_gmt":"2023-07-31T03:40:28","slug":"how-to-enable-anonymous-access-in-sharepoint-2010","status":"publish","type":"post","link":"https:\/\/www.boostsolutions.com\/blog\/how-to-enable-anonymous-access-in-sharepoint-2010\/","title":{"rendered":"Enable Anonymous Access in SharePoint 2010"},"content":{"rendered":"<p>This blog post introduce use two different ways to <strong>enable anonymous access in SharePoint 2010.<\/strong><\/p>\n<p>As a SharePoint administrator, you should be familiar with SharePoint Central Administration. So you can use the following 10 steps to set up anonymous access in SharePoint 2010.<\/p>\n<p>1. Open the SharePoint 2010 Central Administration.<\/p>\n<p>2. On the Central Administration home page, under Application Management, click on the Manage web applications. Then you see the list of web applications. (Figure 1)<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/110.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1915\" alt=\"\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/110.jpg\" width=\"984\" height=\"446\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/110.jpg 984w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/110-300x135.jpg 300w\" sizes=\"(max-width: 984px) 100vw, 984px\" \/><\/a><em>Figure <\/em><em>1<\/em><em> <\/em><\/p>\n<p>3. Select a Web Application which you want to enable anonymous access, and then click Authentication Providers ribbon button.<\/p>\n<p>4. On the Authentication Providers dialog box, click the Default zone. And then show the Edit Authentication dialog box.<\/p>\n<p>5. Under Edit Authentication dialog box, check Enable anonymous access and click save. (Figure 2)<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/28.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1916\" alt=\"\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/28.jpg\" width=\"782\" height=\"591\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/28.jpg 782w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/28-300x226.jpg 300w\" sizes=\"(max-width: 782px) 100vw, 782px\" \/><\/a><em>Figure <\/em><em>2<\/em><em> <\/em><\/p>\n<p>6. Go back to the Web Application Management and click Anonymous Policy ribbon button to set up Anonymous Access Restrictions. (Figure 3)<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/31.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1917\" alt=\"\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/31.jpg\" width=\"892\" height=\"691\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/31.jpg 892w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/31-300x232.jpg 300w\" sizes=\"(max-width: 892px) 100vw, 892px\" \/><\/a><em>Figure <\/em><em>3<\/em><em> <\/em><\/p>\n<p>7. Under the Anonymous Access Restrictions dialog box, set up anonymous user policy for specified zone.<\/p>\n<p>8. Once the above steps have been done. You selected Web Application will allow anonymous access. But until you finish the following steps, anonymous users cannot access any sites at a site collection. So you should go to the Site Permissions of the site which you want to enable anonymous access.<\/p>\n<p>9. On the Site Permissions page, click Anonymous Access ribbon button. (Figure 4 and Figure 5)<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/41.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1918\" alt=\"\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/41.jpg\" width=\"857\" height=\"327\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/41.jpg 857w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/41-300x114.jpg 300w\" sizes=\"(max-width: 857px) 100vw, 857px\" \/><\/a><em>Figure <\/em><em>4<\/em><em> <\/em><\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/51.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1919\" alt=\"\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/51.jpg\" width=\"871\" height=\"724\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/51.jpg 871w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/51-300x249.jpg 300w\" sizes=\"(max-width: 871px) 100vw, 871px\" \/><\/a><em>Figure <\/em><em>5<\/em><em> <\/em><\/p>\n<p>&nbsp;<\/p>\n<p>10. Under the Anonymous Access dialog box, set permission for anonymous users. You can select Entire Web site and save it. (Figure 6)<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/61.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1920\" alt=\"\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/08\/61.jpg\" width=\"875\" height=\"315\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/61.jpg 875w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/08\/61-300x108.jpg 300w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/a><em>Figure <\/em><em>6<\/em><em> <\/em><\/p>\n<p>Done, you can have a try to access your site without login on to make sure it has been enabled Anonymous Access successfully.<\/p>\n<p>Now, you&#8217;d maybe think the process is so simple, and then what is another way?<\/p>\n<p>Keep on, another way is for SharePoint developer. It will enable anonymous access in SharePoint 2010 by coding. And the following is the code snippets:<\/p>\n<pre lang=\"csharp\">using System.Web.Configuration;\r\nusing Microsoft.SharePoint;\r\nusing Microsoft.SharePoint.Administration;\r\n\r\nusing (SPSite specifiedSite = new SPSite(\"You specified web url\"))\r\n{\r\n    using (SPWeb specifiedWeb = specifiedSite.OpenWeb())\r\n    {\r\n        \/\/ Enable anonymous access on web application\r\n        SPUrlZone urlZone = SPUrlZone.Default;\r\n        SPWebApplication specifiedWebApplication = specifiedSite.WebApplication;\r\n        SPIisSettings iisSettings = specifiedWebApplication.IisSettings[urlZone];\r\n        iisSettings.AuthenticationMode = AuthenticationMode.Windows;\r\n        iisSettings.AllowAnonymous = true;\r\n        specifiedWebApplication.Update();\r\n\r\n        \/\/ Enable anonymous access on website\r\n        specifiedWeb.AnonymousState = SPWeb.WebAnonymousState.On;\r\n        specifiedWeb.AnonymousPermMask64 = SPBasePermissions.Open | \r\n            SPBasePermissions.ViewPages | SPBasePermissions.ViewListItems;\r\n        specifiedWeb.Update();\r\n\r\n        \/\/ Enable anonymous acces on list\r\n        SPList specifiedList = specifiedWeb.GetList(\"You specified list url\");\r\n        specifiedList.AnonymousPermMask64 = SPBasePermissions.ViewListItems | \r\n            SPBasePermissions.AddListItems | SPBasePermissions.EditListItems | \r\n            SPBasePermissions.DeleteListItems;\r\n        specifiedList.Update();\r\n    }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This blog post introduce use two different ways to enable anonymous access in SharePoint 2010. As a SharePoint administrator, you should be familiar with SharePoint Central Administration. So you can use the following 10 steps to set up anonymous access in SharePoint 2010. 1. Open the SharePoint 2010 Central Administration. 2. On the Central Administration [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[461,125,480],"tags":[214,215,213,486],"_links":{"self":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1913"}],"collection":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=1913"}],"version-history":[{"count":21,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1913\/revisions"}],"predecessor-version":[{"id":9296,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1913\/revisions\/9296"}],"wp:attachment":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1913"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}