Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Error Layout ModeError Layout Mode
Previous
 
Next
New Post
11/26/2012 3:28 PM
 

Hi, We have many child portals and whenever they try to access their site in Layout Mode they receive an error

An error has occurred.
DotNetNuke.Services.Exceptions.PageLoadException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). ---> System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). at System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) at DotNetNuke.UI.Skins.Pane.ProcessPane() at DotNetNuke.UI.Skins.Skin.ProcessPanes() at DotNetNuke.UI.Skins.Skin.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at DotNetNuke.Framework.DefaultPage.Page_Init(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.Page.OnInit(EventArgs e) at DotNetNuke.Framework.PageBase.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

What can we do to correct this issue?

 
New Post
2/25/2014 6:13 PM
 

I'm getting the same error when entering Layout mode in DNN 7.2.1 on a particular page on my client's website (but not other pages). Here's the stack trace:

DotNetNuke.Services.Exceptions.PageLoadException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). ---> System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
   at System.Web.UI.ControlCollection.AddAt(Int32 index, Control child)
   at DotNetNuke.UI.Skins.Skin.ProcessPanes()
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.AddedControl(Control control, Int32 index)
   at DotNetNuke.Framework.DefaultPage.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   --- End of inner exception stack trace ---

I'm going to look over the skin for this page and see if there's something suspicious but any leads on what to look for and where would be appreciated.

 
New Post
2/25/2014 6:30 PM
 
that typically means an exception is thrown and exception details are written to the page output before the page has started fully generating - when the page tries to generate it finds content and throws that 2nd exception - as such the exception you see is a red herring, you need to find out what exception was thrown before. Most typically I've seen this when a high level element such as menu has failed to load. I'd suggest checking admin->event viewer to see if any error is logged and also considering setting log4net to All in case it captures something (http://www.dnnsoftware.com/wiki/page/...)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
2/25/2014 8:26 PM
 

Sorry if I wasn't clear. This "inner exception" I quoted was from the DNN Event Viewer and there was no other event that immediately preceded this one. In the UI I see:

Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

I will take your advice about log4net and see what that tell me. Thanks!

 
New Post
2/26/2014 12:29 AM
 
Larry, as you specified that the error comes in a particular page only. I believe the error exists in your skin file for that page.

I suggest to :
1. verify the DNN-administration user-controls are configured written properly in the skin files
2. verify the skin file for that page and make sure that any server-code <% .. %> is not creating any issue [this one more probable]
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Error Layout ModeError Layout Mode


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out