Dynamic property - Index was outside the bounds of the array



I'm experience the following error

Server Error in '/' Application.

Index was outside the bounds of the array.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Source Error: 

Line 9:  			base.OnLoad(e);
Line 10: 
Line 11: 		    if (CurrentPage["MainBody"] != null) return;
Line 12: 
Line 13: 		    Visible = false;

Source File: xxxxxxxxx\Templates\Units\MainBody.ascx.cs    Line: 11



This happens when i try to access dynamic contents in my developing environment. In the mainBody I've dynamic contents, thats where the site get this error. I get this error on all dynamic contents.

Have you experienced such an error associated with dynamic content? What to check?




Mar 21, 2013 12:11

Do you get the same error if you try and re-create the dynamic content in edit mode? (or test it on a new page).


Mar 21, 2013 13:29

Thanks for you answer, yes Fredrik I've tried that, I have even created new dynamic contents and tried to use them. Same result on all dynamic content plugins in the project.

Mar 21, 2013 13:41

Does it preview in edit mode for you? Could you test with this code:

<EPiServer:Property runat="server" PropertyName="MainBody" />


Mar 21, 2013 21:21
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.