Error-The Method GetItems of the type List with id is blocked by the administrator on the server

Recently i was working with SharePoint Client object model, suddenly I face an issue while accessing fetching SharePoint list data. Error was-The Method “GetItems” of the type “List” with id “{Lists’s Guid}” is blocked by the administrator on the server

After searching over internet i found the solution and it worked for me:

To solve this issue you need to run below powershell command.

$web = Get-SPWebApplication -Identity siteurl
$web.ClientCallableSettings.AnonymousRestrictedTypes.Remove( [Microsoft.SharePoint.SPList],"GetItems")

After running this command please refresh your page and hopefully you will see the result.


Popular posts from this blog

CAML Query in SharePoint 2010

Calling REST APi from server side code - C#

All about SharePoint 2010 Content Type Hub

SharePoint Interview Questions and Answers

Calling ASP.Net WebMethod using jQuery AJAX