I have a list 'projects' with a DispForm.aspx, and on that DispForm there are associated contacts for that element (contacts list has a direct lookup to the 'projects' list). for the contacts to be filtered by project I set up the connections on the contacts webpart on the DispForm and choose to filter them by the project (lookup column points to ID of projects list).

The filtering works as expected.

But now I have deleted a big structure somewhere else in the site collection. A web with many subwebs in it and many files in them (around 140GB).

After the deletion I noticed that the DispForm of the projects list can no longer be opened. An exception message is displayed:

Server Error in '/' Application.

Value does not fall within the expected range. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Value does not fall within the expected range.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 

[ArgumentException: Value does not fall within the expected range.]
   Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName, Boolean bThrow) +28458710
   Microsoft.SharePoint.SPListItemCollection.GetColumnNumber(String groupName, Boolean bThrowException) +137
   Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException) +1935
   Microsoft.SharePoint.SPListItem.get_Item(Guid fieldId) +105
   Microsoft.SharePoint.WebPartPages.ListFormRowProviderInterface.FireMainIfAppropriate() +781
   Microsoft.SharePoint.WebPartPages.ListFormWebPart.PartCommunicationMain() +141
   Microsoft.SharePoint.WebPartPages.Communication.PartCommunicationPhase.Invoke() +0
   Microsoft.SharePoint.WebPartPages.Communication.ConnectionRuntime.FirePartCommunicationMain() +31
   Microsoft.SharePoint.WebPartPages.SPWebPartManager.ActivateV2Connections() +1190
   Microsoft.SharePoint.WebPartPages.SPWebPartManager.ActivateV2ConnectionsAndSharePointDataFetch() +41
   Microsoft.SharePoint.WebPartPages.SPWebPartManager.ActivateConnections() +538
   System.Web.UI.WebControls.WebParts.WebPartManager.OnPageLoadComplete(Object sender, EventArgs e) +78
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnLoadComplete(EventArgs e) +11852733
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6301 

I opened the DispForm.aspx with "Contents=1" in the URL and removed the 'contacts' WebPart. After that the DispForm could be opened again. I then re-added the 'contacts WebPart and set it up like before (same view/columns/server rendering etc.) but did not set up the WebPart connections yet. After that everything was still OK. The DispForm could be opened and the contacts list was displayed with its entries.

Then I also tried to restore the WebPart connection between 'contacts' and 'project' on the DispForm. After I applied the connection setting the page reloaded and showed me the same error message again.

I restored the site again to check if it really is the deletion that triggers this error and indeed it was. Page was OK when the other webs were present - after deletion the error occurs.

So something in the WebPart connection seems to trigger this error. But only now, after deletion of the other webs.

What could this be?

1 Answer 1


Wow, I actually found out what was wrong after narrowing it down by deleting the webs in batches and see if it still works.

On a side note: When googling for this exception nearly all pages will tell you that the issues comes from the lookup limit being exceeded and that the threshold should be increased on the WebApp. I doubted that this was the cause as deleting webs should not influence this - I changed the setting anyway and indeed it didn't help.

What helped was, that after deleting the webs in batches I found out that the error occurs after I delete a list in a certain web. This let me to believe that something with a lookup in the source list must be wrong and indeed it was.

A colleague copied the 'projects' list and associated lists from the web that caused the troubles using the content deployment wizard. Somehow in the new web the lookups pointed all to the new associated lists except one list. One list still pointed to the original list inside the web that has been exported by the Content Deployment Wizard.

I updated the field schema through PowerShell so that the lookup points to the correct list in the correct web. After that I deleted the old web (where the lists originated from) and the error did not occur again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.