Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • andles 44 posts 64 karma points
    Mar 05, 2012 @ 13:31
    andles
    0

    Hostname 'duplicate key' exception has broken website

    Umbraco 5.0.0 RTM (Assembly version: 5.0.310.16) , Windows 7 IIS local server, SQL Compact

    I added a content node, Umbraco v5 told me it couldnt generate a URL for it as it had no hostname. I added a hostname, it accepted it, but still said it couldnt generate a URL for it as it had no hostname.

    I went back, the hostname had dissapeared. I refreshed, logged in and out, and still the hostname was nowhere to be seen.

    I recreated the hostname, then Umbraco complained that it did not like the duplicate hostname by producing the below exception - an exception that occurs whenever any attempt to add, edit or update any node in my site is made. My site is basically non functional at this stage.

    I suspect I somehow need to manually remove the duplicate from the underlying database? Not sure how to go about this without causing more harm than good? Is there an easier solution??

     

    Exception

    An item with the same key has already been added.

    Stack trace

    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item) at System.Collections.ObjectModel.KeyedCollection`2.InsertItem(Int32 index, TItem item) at System.Collections.ObjectModel.Collection`1.Add(T item) at Umbraco.Cms.Web.Routing.DefaultRoutingEngine.<get_DomainList>b__17() at Umbraco.Framework.HttpRuntimeApplicationCache.GetOrCreate[T](String key, Func`1 callback) at Umbraco.Cms.Web.Routing.DefaultRoutingEngine.get_DomainList() at Umbraco.Cms.Web.Routing.DefaultRoutingEngine.GetNonDomainUrl(IEnumerable`1 ancestorsOrSelf) at Umbraco.Cms.Web.Routing.DefaultRoutingEngine.<>c__DisplayClass21.<GetAllUrlsForEntity>b__1e() at Umbraco.Framework.HttpRuntimeApplicationCache.GetOrCreate[T](String key, Func`1 callback) at Umbraco.Cms.Web.Routing.DefaultRoutingEngine.GetAllUrlsForEntity(TypedEntity entity) at Umbraco.Cms.Web.Editors.ContentEditorController.PopulateUrls(ContentEditorModel contentViewModel, TypedEntity source) at Umbraco.Cms.Web.Editors.ContentEditorController.OnEditing(ContentEditorModel model, EntitySnapshot`1 entity) at Umbraco.Cms.Web.Editors.AbstractRevisionalContentEditorController`1.Edit(Nullable`1 id) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 
Please Sign in or register to post replies

Write your reply to:

Draft