Saturday, 6 June 2015

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.

No comments:

Post a Comment

Dear Readers, Please post your valuable feedback in the comment section if you like this blog or if you have any suggestions. I would love to hear the same from you. Thanks