Error (The method "GetItems" of the type "List" with id is blocked by the administrator on the server ) when accessing client object model in public facing website.

 

We might have seen this error several time. (The method “GetItems” of the type “List” with id is blocked by the administrator on the server )Here is my scenario. We had launched a public facing website built in SharePoint 2010. Basically this error occurs when site has anonymous access and where Client Object Model is used for accessing list on the site.

To fix this problem perform following steps.

  • Open SharePoint 2010 management shell and run following commands

    $webapp = Get-SPWebApplication “your site url”
    $webapp.ClientCallableSettings.AnonymousRestrictedTypes.Remove([microsoft.sharepoint.splist], “GetItems”)
    $webapp.Update()

To know more about  “ClientCallableSettings”  visit this link
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spclientcallablesettings.aspx

Shraddha Shah
SharePoint Developer