SharePoint In Action

An attempt to share my day-to-day SharePoint experience

Archive for the tag “SharePoint ClientCallableSettings”

Error: The Method “GetItems” of the type “List” with id “{Lists’s Guid}” is blocked by the administrator on the server

Hi all,

I was using SharePoint Client Object Model when I got the error above. Basically I was trying to get all items from a list using JavaScript’s get_lists function. It seems the function is inaccessible in anonymous mode. The solution is removing the function GetItems from AnonymousRestrictedTypes using PowerShell:

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

and in case you change your mind later, you can addf GetItems to AnonymousRestrictedTypes using commands below:

$web = Get-SPWebApplication -Identity http://your web address
$web.ClientCallableSettings.AnonymousRestrictedTypes.Add( [Microsoft.SharePoint.SPList],"GetItems")
$web.Update()

Hope that was useful!

Cheers,
Nader Heshmat

Advertisements

Post Navigation