SharePoint 4 Developers

Additional reference guide in .NET / SharePoint Development

Value does not fall within the expected range

Value does not fall within the expected range. I have decided to create this post to alert developers about this.

Hi folks,

This week I faced an error that was a real pain, and because of that I decided to create this post. To alert others about this.

I was developing a Silverlight Application in SharePoint and all of a sudden started getting the error message: Value does not fall within the expected range.

As I am using the Silverlight Object Model, I decided to see more details about this error through Fiddler. I got this:

1
Figure 1 – Fiddler analysis

It simply didn’t help at all. Really hard to identify what it is. Sad smile

Solution

In a different environment the same code was working perfectly fine, so I eliminated any issues with the code.

Luckily (or not), by checking the Lists I found this error message in my view:

This view cannot be displayed because the number of lookup and workflow status columns it contains exceeds the threshold (8) enforced by the administrator.

In order to solve this “other” issue I was obliged to set the Resource Throttling value up for “List View Lookup Threshold”.

Go to the Central Admin > Application Management > Manage web applications

2
Figure 2 – Manage web applications

Select the web application that needs to be changed, and then go to General Settings > Resource Throttling

3
Figure 3 – Resource Throttling

Increase the value of the List View Lookup Threshold, according to the Figure 4:

4
Figure 4 – List View Lookup Threshold

By saving this change, when I got back to the List, the error message disappeared and hence the issue with application was eliminated! My application just worked fine! Smile

Considerations

Because of the business requirements in my solution, the threshold needed to be increased.

Always evaluate the impact of changing default threshold values in SharePoint.

Be aware of the amount of columns in your Lists. This threshold affects Lookup, Person/Group and Workflow Status fields.

I hope it helps.

References:
http://ranaictiu-technicalblog.blogspot.com/2010/12/sharepoint-2010-error-list-view-lookup.html
http://blogs.msdn.com/b/dinaayoub/archive/2010/04/22/sharepoint-2010-how-to-change-the-list-view-threshold.aspx

Cheers,

Marcel Medina

Click here to read the same content in Portuguese.

blog comments powered by Disqus