Item has already been added. Key in dictionary: 'Telerik.Web.SkinsAssembly' in 2011.2.712.40

Thread is closed for posting
4 posts, 0 answers
  1. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 26 Sep 2011 Link to this post

    After upgrading to ver.2011.2.712.40 we've started receiving the error below:

    Message : Item has already been added. Key in dictionary: 'Telerik.Web.SkinsAssembly'  Key being added: 'Telerik.Web.SkinsAssembly'

    Source : mscorlib

    Help link :

    ParamName :

    Data : System.Collections.ListDictionaryInternal

    TargetSite : Void Insert(System.Object, System.Object, Boolean)

    Stack Trace :    at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

       at System.Collections.Hashtable.Add(Object key, Object value)

       at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd(String name, Object value)

       at System.Collections.Specialized.NameObjectCollectionBase.BaseSet(String name, Object value)

       at System.Collections.Specialized.NameValueCollection.Set(String name, String value)

       at Telerik.Web.SkinRegistrar.GetDefaultSkinsAssemblyName()

       at Telerik.Web.SkinRegistrar.GetAllEmbeddedSkinAttributes(RadSkinManager skinManager, Type controlType)

       at Telerik.Web.UI.Common.BaseClass.GetShortControlName(Control control)

       at Telerik.Web.UI.Common.BaseClass.GetValueFromConfig(String keyFormat, Control control)

       at Telerik.Web.UI.Common.BaseClass.GetGlobalEnableEmbeddedBaseStylesheet(Control control)

       at Telerik.Web.UI.RadDataBoundControl.get_EnableEmbeddedBaseStylesheet()

       at Telerik.Web.UI.RadDataBoundControl.Telerik.Web.ISkinnableControl.get_EnableEmbeddedBaseStylesheet()

       at Telerik.Web.SkinRegistrar.GetEmbeddedSkinAttributes(ISkinnableControl control, Type controlType)

       at Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control)

       at Telerik.Web.UI.RadDataBoundControl.RegisterCssReferences()

       at Telerik.Web.UI.RadDataBoundControl.ControlPreRender()

       at Telerik.Web.UI.RadDataBoundControl.OnPreRender(EventArgs e)

       at System.Web.UI.Control.PreRenderRecursiveInternal()

       at System.Web.UI.Control.PreRenderRecursiveInternal()

       at System.Web.UI.Control.PreRenderRecursiveInternal()

       at System.Web.UI.Control.PreRenderRecursiveInternal()

       at System.Web.UI.Control.PreRenderRecursiveInternal()

       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


    We have 7 servers in a web farm and it occurs randomly on 1-2 servers but every day usually right after a daily IIS pool recycle. No skin setiing in the web.config. Some telerik controls use a default skin (no skin value set), some of them use our custom skin (set in the control property).

    Please advise.
  2. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 27 Sep 2011 Link to this post

    Hi Miksh,

    Check your the <appsettings> section of your Web.config file and see if there is a key there named "Telerik.Web.SkinsAssembly". If you don't have it, add the following line:

    <add key="Telerik.Web.SkinsAssembly" value="DISABLED" />

    You might also check if you have upgraded all instances of the Telerik.Web.UI assembly to the new version and none of your code is referencing the old one.


    Greetings,
    Lini
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 27 Sep 2011 Link to this post

    We'll try thanks.
    Sorry, didn't mention that we didn't put Telerik.Web.UI.Skins.dll into bin folder. Would your suggestion work in this case?

    What would you recommend if we add Telerik.Web.UI.Skins.dll into bin folder?
  5. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 27 Sep 2011 Link to this post

    Hi,

    If the Telerik.Web.UI.Skins.dll is in the bin folder, alongside Telerik.Web.UI.dll, then you can set the app setting value to "Telerik.Web.UI.Skins" instead of "DISABLED":

    <add key="Telerik.Web.SkinsAssembly" value="Telerik.Web.UI.Skins" />

    In either case, having this key in the Web.config should prevent the exception from occurring. On a side note, if you are only using the Default skin or your own custom skin, then you do not need the Telerik.Web.UI.Skins.dll assembly - the Default skin is in Telerik.Web.UI.dll.

    Best wishes,
    Lini
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top