Create Datatable using .Net Client Context in SharePoint 2010

Create Data Table while using SharePoint 2010 Client Context with .Net Code I am using .net code to access SharePoint List.I created a method ExecuteSPQuery() which returns Data Table. For that I wrote below code. public static DataTable ExecuteSPQuery()     {         DataTable dtData = new DataTable();         Microsoft.SharePoint.Client.ListItemCollection listCollection = null;         ClientContext context = new ClientContext(“SITE_URL”);         try         {                        Site oWebsite = context.Site;             context.AuthenticationMode = ClientAuthenticationMode.Anonymous;             List list = … Read more

Display SharePoint List Items using ECMA Script – Client Object Model

Display SharePoint List Items using ECMA Script In this blog, I will explain, how to get list items using ECMA Script.ECMA script is a client side way to work with SharePoint object. Create a web part page in page library. Add a content editor web part on that page.In content editor webpart write below code: … Read more

Throttling and Indexing in SharePoint List

What is Throttling and Indexing in SharePoint List? In SharePoint, List is like a table with rows and columns. Similar to SQL tables SharePoint List need indexing if contains heavy amount of data else it will degrade the performance of SharePoint application. So what is Indexing in SharePoint List? Indexing in SharePoint list is similar … Read more

Resource Throttling Setting unable to open, Error message is Updates are currently disallowed on GET requests.

Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb. I searched on google and found the solution.You need to update webapplication throttle setting through powershell command $w = get-spwebapplication http://mysite:2015$w.HttpThrottleSettings$w.Update() List Threshold setting page should open now.

What is QueryThrottleMode in SPQuery Class?

As per MSDN definition, QueryThrottleMode is a property of SPQuery class which gets or sets value that indicate the throttling mode to be applied to the query. As we know that List Throttling is a new option available in SharePoint 2010. List Throttling limits the list data that will be fetched in a single request.Beyond the limit, request will … Read more

The method “GetItems” of the type “List” with id “{Guid}” is blocked by the administrator on the server.

I was working on SharePoint Client Context, and i was writing a piece of code to fetch items from SharePoint list. I got this error at this line:objContext.ExecuteQuery(); I solved this issue by executing powershell command.Open SharePoint Powershell  and type below command one by one. $webapp = Get-SPWebApplication “http://spserver”$webapp.ClientCallableSettings.AnonymousRestrictedTypes.Remove([microsoft.sharepoint.splist], “GetItems”)$webapp.Update()Open SharePoint Powershell  and type below command … Read more