When opening a sub-folder in a shared document library to view the files, I receive the following exception:

[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.ThrowHelper.ThrowArgumentOutOfRangeException() +78
   System.Collections.Generic.List`1.get_Item(Int32 index) +53
   System.Web.UI.WebControls.MenuItemCollection.RemoveAt(Int32 index) +27
   ASP.adeceef9_c3cf_4497_aaed_b0aa3202002d_489600446.Page_Load(Object sender, EventArgs e) +67
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428

Here is where it gets weird. If I right click on the name of the folder and open it in a new IE tab, it opens with no exception! If I click the folder name in the normal fashion to open in the current tab, it crashes out.

Also, if I remove the View parameter from the query string after receiving the error and reload the page, it loads ok. E.g: This fails:


This works:


If I change the view before I try to open the sub-folder, it opens fine regardless of which view I choose. As a result of this, I have tried changing the default views of the library, but it makes no difference.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.