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 )

18880 put(a) pogledan, 2 odgovor(a) 4.1.2016. 15:52:26Kreirao(la) stevescotthome
stevescotthome

stevescotthome

4.1.2016. 15:52:26
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?
Ovaj sadržaj još nije ocijenjen. 
50 Reputacija 7 Ukupno objava
khorvat

khorvat

4.1.2016. 15:58:34
Hi,

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

Regards
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava