Friday, May 13, 2011

Tips for Anonymous site in SharePoint 2010

These are some tips to publish your site with anonymous access.
  1. From Central Administration >> Web Applications Management >> then select your web application >> Authentication Providers >> Select the zone which publish it to the internet (In my case is Default Zone) >> Enable anonymous access
2.  Then open your site collection and go to Site Settings >> Site Permissions >> Anonymous Access (top in Ribbon) >> Select Entire Web site.
3.  Make sure all pages, master pages , layouts , images ,item style and css have published (Checked in and Published).

4. If you have a page in layouts folder (14-hive folder) then make sure the page inherence from System.Web.UI.Page not other namespace and class (like LayoutsPageBase).

5. If you have Client Object Model (ECMAScript) in your page make sure to run the following script to remove the striction from SharePoint 2010 with anonymous access (be careful when you are using Client Object with anonymous access to access any sensitive information )

$wa = Get-SPWebApplication -Identity "http://SiteCollectionUrl"
$wa.ClientCallableSettings.AnonymousRestrictedTypes.Remove([Microsoft.SharePoint.SPList], "GetItems")
$wa.Update()

6. If you have for example a page which insert an item to custom list and you need to enable the user insert the item anonymously you have to break the permission of this list from list Settings >> then Select Permissions for this list and then Click on Anonymous Access and Select Add Items permission.

7. Avoid Operation of attaching a workflow (ex. SharePoint Designer workflow) with the item insertion or uploading file because these functions not work properly in anonymous access.

8.Finally to access the site via mobile device and avoid the unauthorized page error or to browse the site same as normal browser so just past this configuration in web.config of Web application under system.web section

<browserCaps>
  <result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
  <filter>isMobileDevice=false</filter>
</browserCaps>

2 comments:

Anonymous said...

Thanks Fadi for your great article , my searching time saved :)

Anonymous said...

Thanks for all those tips, good reference :)
An extra tip, deploy this solution to publish all contents
www.thelapointes.com/blog/Lapointe.SharePoint.STSADM.Commands.wsp
http://blog.falchionconsulting.com/index.php/downloads/