[Mono-devel-list] Fwd: mono 1.1.3 broke my site

Joe Audette joe_audette at yahoo.com
Mon Dec 13 19:22:02 EST 2004


oops I posted the wrong code segment, it should be:
 

private void BuildContents() 

{

if (this.defaults.HasControls()) 

{

this.defaults.ID = this.defaultContent;

this.contents.Add(this.defaults);

}

foreach (ContentRegion content in this.contents) 

{

Control region = this.FindControl(content.ID);

if (region == null || !(region is ContentRegion)) 

{

throw new Exception("ContentRegion with ID '" + content.ID + "' must be Defined");

}

region.Controls.Clear();



int count = content.Controls.Count;

for (int index = 0; index < count; index++) 

{

Control control = content.Controls[0];

content.Controls.Remove(control);

region.Controls.Add(control);

}

}

}


Joe Audette <joe_audette at yahoo.com> wrote:
Date: Mon, 13 Dec 2004 16:19:45 -0800 (PST)
From: Joe Audette 
Subject: mono 1.1.3 broke my site
To: Mono-devel-list at lists.ximian.com

Hi,
 
I have a site hosted at monoforge, my site is http://mojoportal.monoforge.com
Yesterday monoForge updated to mono 1.1.3 and now my site doesn't work. My site uses Paul Wilson's MasterPages which allows easy site skinning. The error I get is:
 
System.ArgumentException: length
in <0x001f9> System.Array:Copy (System.Array,int,System.Array,int,int)
in <0x00070> System.Web.UI.ControlCollection:RemoveAt (int)
in <0x00028> System.Web.UI.ControlCollection:Remove (System.Web.UI.Control)
in <0x00215> mojoPortal.Web.MasterPage:BuildContents ()
in <0x00015> mojoPortal.Web.MasterPage:OnInit (System.EventArgs)
in <0x001a8> System.Web.UI.Control:InitRecursive (System.Web.UI.Control)
in <0x0017c> System.Web.UI.Control:InitRecursive (System.Web.UI.Control)
in <0x00055> System.Web.UI.Page:InternalProcessRequest ()
in <0x000b4> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
in <0x00292> ExecuteHandlerState:Execute ()
in <0x00083> StateMachine:ExecuteState (System.Web.HttpApplication/IStateHandler,bool&)
 
the code is:
 

private void BuildMasterPage() 

{

if (this.templateFile == "") 

{

throw new Exception("TemplateFile Property for MasterPage must be Defined");

}

this.template = this.Page.LoadControl(this.templateFile);

this.template.ID = this.ID + "_Template";



int count = this.template.Controls.Count;

for (int index = 0; index < count; index++) 

{

Control control = this.template.Controls[0];

this.template.Controls.Remove(control);

if (control.Visible) 

{

this.Controls.Add(control);

}

}

this.Controls.AddAt(0, this.template);

}

Any suggestions?
 
Best Regards,
 
Joe Audette


joe_audette at yahoo.com
http://www.joeaudette.com
http://www.mojoportal.com

joe_audette at yahoo.com
http://www.joeaudette.com
http://www.mojoportal.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041213/2e48c73c/attachment.html 


More information about the Mono-devel-list mailing list