Please see the latest edit at the bottom.
I have multiple sites, within the same Sharepoint site, that each have documents within the Shared Documents section of the site. The majority of these sites work perfectly fine, people can view, download, edit, etc, all the files stored there.
There is one site, however, that does not give access to anything the majority of the time. When I try to go into the folders I am greeted with the error:
Index was out of range. Must be non-negative and less than the size of the collection
This particular site is not setup any differently to the rest and, strangely, it doesn't happen ALL the time, just the majority of the time.
Why would this be happening? What should I do to stop it?
EDIT: I can open the folders in Windows Explorer and see everything I need to see, it's just when trying to view them inside the Shared Documents library that the error occurs.
I have tried removing and re-adding all the documents to see if it made any difference, but it didn't. Still index out of range exception.
EDIT: Using the ULSViewer when replicating the error does not produce any error messages. When I click on other links it does produce entries in the log, just nothing when I replicate the problem.
EDIT: The stack trace looks like:
[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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
EDIT: OK I have figured out that it is definitely a
View problem. When I click into a file or folder in the document list, it returns the error from above. However if I remove, from the URL, the text
&View=%7b8439DB47%2d3CED%2d470F%2d9ED5%2d8BA42A63B41C%7d it displays correctly. So, I don't know how to display this properly automatically. Obviously there is a change I need to make with regards to the Views but I don't know where to start?