MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

WAO IndexOutOfRangeException: Index was outside the bounds of the array Error  (Mono Support )

Viewed 18221 time(s), 2 post(s) 1/4/2016 3:52:26 PMby stevescotthome
stevescotthome

stevescotthome

1/4/2016 3:52:26 PM
Site got hammered over the weekend, users were getting this error

System.Collections.Generic.List`1+Enumerator.MoveNext():35
   ..(String requestDomain):158
MonoSoftware.Web.WAO.ViewState.Configuration.ViewStateConfiguration.GetPageStatePersister(Page page):47
Medportal.Sitefinity.Controls.Code.CustomViewStatePage.get_PageStatePersister() in C:\Medportal\Master\Medportal.Sitefinity.Controls\Code\CustomViewStatePage.cs:24
System.Web.UI.Page.RegisterRequiresControlState(Control control):105
Telerik.Web.UI.RadListView.OnInit(EventArgs e):21
System.Web.UI.Control.InitRecursive(Control namingContainer):255
System.Web.UI.Control.InitRecursive(Control namingContainer):143
System.Web.UI.Control.InitRecursive(Control namingContainer):143
System.Web.UI.Control.AddedControl(Control control, Int32 index):194
System.Web.UI.Control.EnsureChildControls():70
System.Web.UI.Control.PreRenderRecursiveInternal():47
System.Web.UI.Control.PreRenderRecursiveInternal():142
System.Web.UI.Control.PreRenderRecursiveInternal():142
System.Web.UI.Control.PreRenderRecursiveInternal():142
System.Web.UI.Control.PreRenderRecursiveInternal():142
System.Web.UI.Control.PreRenderRecursiveInternal():142
System.Web.UI.Control.PreRenderRecursiveInternal():142
System.Web.UI.Control.PreRenderRecursiveInternal():142
System.Web.UI.Control.PreRenderRecursiveInternal():142
System.Web.UI.Control.PreRenderRecursiveInternal():142
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint):1747

This is the class
public class CustomViewStatePage : System.Web.UI.Page
    {
        private System.Web.UI.PageStatePersister _pageStatePersister = null;
 
        protected override System.Web.UI.PageStatePersister PageStatePersister
        {
            get
            {
                if (_pageStatePersister == null)
                    _pageStatePersister = ViewStateConfiguration.GetPageStatePersister(this.Page);
                return _pageStatePersister;
            }
 
        }
 
        protected override object LoadPageStateFromPersistenceMedium()
        {
            try
            {
                return base.LoadPageStateFromPersistenceMedium();
            }
            catch (Exception ex)
            {
                //Handle the missing viewstate by returning the empty state pair
                System.Web.UI.PageStatePersister pageStatePersister = new System.Web.UI.HiddenFieldPageStatePersister(this.Page);
                Debug.WriteLine(ex);
                return new System.Web.UI.Pair(pageStatePersister.ControlState, pageStatePersister.ViewState);
            }
        }
    }

We are using the DB persisted config... any idea what the problem might have been?  Was the DB down or something maybe? ...can the error be elegantly handled somehow?
This content has not been rated yet. 
50 Reputation 7 Total posts
khorvat

khorvat

1/4/2016 3:58:34 PM
Hi,

can you please send us web.config WAO configuration so we can review ?

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts