This is a migrated thread and some comments may be shown as answers.

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

3 Answers 324 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
miksh
Top achievements
Rank 1
Iron
miksh asked on 26 Sep 2011, 04:49 PM
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.

3 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 27 Sep 2011, 07:54 AM
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
0
miksh
Top achievements
Rank 1
Iron
answered on 27 Sep 2011, 01:23 PM
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?
0
Lini
Telerik team
answered on 27 Sep 2011, 03:29 PM
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
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
miksh
Top achievements
Rank 1
Iron
Answers by
Lini
Telerik team
miksh
Top achievements
Rank 1
Iron
Share this question
or