When an anonymous user is trying to access your SharePoint site application data through one of the Infragistics SharePoint web parts, she or he might receive the following message:
This is caused since the method GetItems, listed in the message, is defined as a restricted type thus preventing anonymous users for accessing it. This method is used by the client object model for retrieving data in sandbox solutions, including the Infragistics SharePoint web parts.
Unfortunately, Microsoft did not provide a GUI for removing methods from the restricted types list – you will have to do this through the SharePoint Management Shell console. That means you will need administrative access to the SharePoint server.
1. Get a reference to your web application using the code:
The $wa variable would be further used in the scripts
Now you can optionally check if the GetItems method is restricted for your web application. You can do by calling the following script:
This will give you the following:
In the MethodNames you can see that GetItems is listed as a restricted type.
2. Remove the GetItems method from the restricted list
Using the following command, removes the GetItems method from the restricted types:
If you would like to restrict the GetItems method again, just use Add instead of Remove in above script.
3. Update your web application
The last thing you need to do is to update your web application using the update method as follows:
Finally you can check if the GetItems method has been properly removed from the restricted types list, running again the following script:
As you can see from the screenshot above, the GetItems method has been successfully unlisted from the restricted methods list.
Now anonymous users will be able to see data inside the web parts without error.
Official NetAdvantage for SharePoint Web Site: http://www.infragistics.com/dotnet/netadvantage/sharepoint.aspx#Overview
Official NetAdvantage for SharePoint Samples: http://sharepoint.infragistics.com/