Value was either too large or too small for an Int32

Value was either too large or too small for an Int32

In one of my previous post I had demonstrated how to, Download Large Files from SharePoint Online. While the file download is working perfectly fine, but, I was constantly getting the following error while trying to load/access it’s properties,

Value was either too large or too small for an Int32

Continue reading

SharePoint REST API C#

SharePoint Online External List

In this blog post, I’ll show how to use SharePoint REST API, in a C# console application i.e., .NET server side, to fetch ListItems from a SharePoint Online List.
Continue reading

Query ListItems in Batches – SharePoint Online

CSOM 5000+ items get error

I have this application, in CSOM, which used to get the entire ListItems of a SharePoint List at one go to perform certain operations. All was well and good, until, I exported a brand new SharePoint List from Excel. The List had around 5400 items (>5000). When I tried to fetch all of its items, in the same way, I received the following error:

The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator

Continue reading

SharePoint ListItems Group By

SharePoint Grouped ListItems

In the above screenshot, I have applied a GroupBy setting on a SharePoint View. I needed the same exact values in my application through JSOM. However, all of the online examples, that I came across, were of retrieving all the ListItems of a SharePoint List. You can either retrieve all the items at once or in batches, but there seems to be no provision of applying grouping or aggregation on the ListItems through code!

Somehow, I wasn’t convinced of this and was vehemently against this idea of pulling all the data on client-side first, thereafter applying grouping and aggregations.

Continue reading

403 Forbidden Error while calling GetWebPartPage SharePoint Online

Premise

I had this code, https://realmpksharepoint.wordpress.com/2014/04/07/get-webpart-page-of-a-sharepoint-site-using-web-services-c/ which I was using to download the html content of a SharePoint page along with all the web parts. The importance of this method is that it eliminates the external file references, so in the response, you will get the schema of all the web parts of that page only.

Issue

The code was working fine until recently, when it suddenly stopped working and I started to receive the error, 403 Forbidden.

Continue reading

SharePoint REST – Get Fields whose Name starts with a Number or Special Character

Premise

I had a SharePoint hosted app. In this app, I was querying a List’s item using SharePoint REST API.

Problem

While I had no issues querying items based on a specific query, surprisingly, for certain columns, I was not getting any values. Following is my code snippet that was trying out initially:

Continue reading

Download Large Files from SharePoint Online

In my previous post, I had explained how to upload large files up to 10 GB to SharePoint Online. This is as per the new revised upload limit. The upload operation, as we know, is actually incomplete without download. I mistakenly, assumed that the previous code for file download will work for the latest larger files as well. But, just like I had to rewrite the upload code to accommodate this new limit, file download also needed a complete makeover. I initially tried the following ways with no success.

Continue reading