Umbraco 6 unhandled exception help needed with multi domain site
Installed Umbraco 6 about a week ago, build going well until I come to add another homepage root (multi site / url installation) and I got the following error:
Server Error in '/' Application.
An item with the same key has already been added.
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.ArgumentException: An item with the same key has already been added.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: An item with the same key has already been added.]
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at umbraco.controls.ContentControl.AddControlNew(Property p, TabPage tp, String Caption)
at umbraco.controls.ContentControl.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at umbraco.controls.ContentControl.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at umbraco.cms.presentation.editContent.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.umbraco_editcontent_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\dc787942\643abf39\App_Web_editcontent.aspx.5f2dec3.mu4zwoaq.0.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I've tried to rebuild the source and attach the debug dlls but it's not getting picked up at all - any ideas or suggestions or is this a known bug?
Panic over, eventually I got the source playing nicely with the running instance and discovered the problem was due to a duplicate property that had appeared in an inherited doc type.
Moving forwards, it would be nice if Umbraco would recognise that there are duplicate properties when the doc type is saved so this cannot occur. Alternatively either provide a more user friendly error message OR handle the error nicely with a warning so the UI is still usable.
Umbraco 6 unhandled exception help needed with multi domain site
Installed Umbraco 6 about a week ago, build going well until I come to add another homepage root (multi site / url installation) and I got the following error:
Server Error in '/' Application.
An item with the same key has already been added.
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.ArgumentException: An item with the same key has already been added.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: An item with the same key has already been added.]
System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +52
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +10691810
System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) +10
umbraco.controls.ContentControl.AddControlNew(Property p, TabPage tp, String Caption) +218
umbraco.controls.ContentControl.CreateChildControls() +602
System.Web.UI.Control.EnsureChildControls() +83
umbraco.controls.ContentControl.OnInit(EventArgs e) +38
System.Web.UI.Control.InitRecursive(Control namingContainer) +134
System.Web.UI.Control.AddedControl(Control control, Int32 index) +191
System.Web.UI.ControlCollection.Add(Control child) +86
umbraco.cms.presentation.editContent.OnInit(EventArgs e) +1130
System.Web.UI.Control.InitRecursive(Control namingContainer) +134
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +489
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18034
The UmbracoTraceLog.txt file shows:
2013-02-10 12:50:42,251 [43] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 42] An unhandled exception occurred
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at umbraco.controls.ContentControl.AddControlNew(Property p, TabPage tp, String Caption)
at umbraco.controls.ContentControl.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at umbraco.controls.ContentControl.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at umbraco.cms.presentation.editContent.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.umbraco_editcontent_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\dc787942\643abf39\App_Web_editcontent.aspx.5f2dec3.mu4zwoaq.0.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I've tried to rebuild the source and attach the debug dlls but it's not getting picked up at all - any ideas or suggestions or is this a known bug?
Simon
Panic over, eventually I got the source playing nicely with the running instance and discovered the problem was due to a duplicate property that had appeared in an inherited doc type.
Moving forwards, it would be nice if Umbraco would recognise that there are duplicate properties when the doc type is saved so this cannot occur. Alternatively either provide a more user friendly error message OR handle the error nicely with a warning so the UI is still usable.
Simon
The stack trace you posted looks very similar to the one Matt posted for this issue http://issues.umbraco.org/issue/U4-1685?preventRedirect=true#
is working on a reply...