Exception after upgrade to 2011.2.712: Item has already been added

26 posts, 0 answers
  1. Eliyahu Goldin
    Eliyahu Goldin avatar
    85 posts
    Member since:
    Apr 2007

    Posted 08 Sep 2011 Link to this post

    I have a page with a SkinMaster control:

    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" Skin="Sunset"</telerik:RadSkinManager>

    The page was working ok in production environment for about a year. Recently, I upgraded to Telerik.Web.UI.dll 2011.2.712.40. After that I started getting exceptions of this type:

    Exception type: ArgumentException

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

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

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

       at Telerik.Web.SkinRegistrar.GetDefaultSkinsAssemblyName()

       at Telerik.Web.SkinRegistrar.GetAllEmbeddedSkins(RadSkinManager skinManager)

       at Telerik.Web.UI.RadSkinManager.FillSkins(RadComboBox chooser)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

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


    The error seems to be random, it appeared twice within 10 days. So far i can't reproduce it. I get notified about the error from my web server alert service and I don't know if users get any visual indications of the error or no. I have no way of asking the users.

    Any clues?

  2. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 14 Sep 2011 Link to this post

    Hello Eliyahu,

    Thanks for reporting this observation. Our development team is currently looking into it and will be getting back with more information. Please, stand by.

    Regards, Tsvetoslav
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 14 Sep 2011 Link to this post

    Hello Eliyahu,

    This exception is not expected - what the stack traces says is that a duplicate entry for "Telerik.Web.Skins" is being added to the AppSettings configuration setting. Could you check if you are not modifying the AppSettings at some place in your code and if the problem persists, send us a small runnable example of you implementation so that we can take a closer look.

    Thanks in advance.

    Regards, Tsvetoslav
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
  4. Mark Kucera
    Mark Kucera avatar
    84 posts
    Member since:
    Sep 2009

    Posted 20 Oct 2011 Link to this post

    Was there any resolution to this?  I have this problem as well.  Like the original poster said, it's not really reproducible on-demand.  i get an email of all the exceptions on my website and i see this one come through every so often.

    Error Occurred: 10/19/2011 4:13 PM
    Exception: System.ArgumentException
    Message: Item has already been added. Key in dictionary: 'Telerik.Web.SkinsAssembly'  Key being added: 'Telerik.Web.SkinsAssembly'
    RequestString: /campaign/EmailMain.aspx?
    secID=3&subNav=8&Mode=New
    Server: xxxxxxxxxxxxx
    User Identity: xxxxxxxxxx
    StackTrace:
      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 System.Collections.Specialized.NameValueCollection.set_Item(String name, String value)
      at Telerik.Web.SkinRegistrar.GetDefaultSkinsAssemblyName()
      at Telerik.Web.SkinRegistrar.GetAllEmbeddedSkinAttributes(RadSkinManager skinManager, Type controlType)
      at Telerik.Web.SkinRegistrar.GetAllEmbeddedSkinAttributes(Type controlType, Page page)
      at Telerik.Web.UI.Common.BaseClass.GetShortControlName(Control control)
      at Telerik.Web.UI.Common.BaseClass.GetValueFromConfig(String keyFormat, Control control)
    - Show quoted text -
      at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    I'm using version 2011.2.712.35

    -Mark
  5. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 25 Oct 2011 Link to this post

    Hi Mark,

    We have not yet encountered this problem neither could we reproduce it and hence no solution has been looked for. I'd ask you the same question addressed to Mark: could you check if you are not modifying the AppSettings at some place in your code and if not, upgrade to the latest internal build of the controls or the beta of the Q3 2011 one and see if the problem persists.

    Greetings, Tsvetoslav
    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
  6. Didier
    Didier avatar
    13 posts
    Member since:
    Jan 2008

    Posted 27 Oct 2011 Link to this post

    Hi,

    Same problem here which occurs randomly but each time we get the error message... the IP demonstrates that a robot was browsing the website.

    Here is a fresh example, hope it may help..

    ** Events **

    ---------------

    Event code: 3005

    Event message: An unhandled exception has occurred.

    Event time: 10/27/2011 3:41:58 AM

    Event time (UTC): 10/27/2011 1:41:58 AM

    Event ID: 9f982257e01e4deda4e103e61a3b9fa1 Event sequence: 6 Event occurrence: 1 Event detail code: 0

     

    Process information:

        Process ID: 1356

        Process name: w3wp.exe

        Account name: AUTORITE NT\SERVICE RÉSEAU

     

    Exception information:

        Exception type: System.ArgumentException

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

     

    Request information:

        Request URL: http://www.saniverte.com/Default.aspx

        Request path: /Default.aspx

        User host address: 178.154.200.158

        User:

        Is authenticated: False

        Authentication Type:

        Thread account name: AUTORITE NT\SERVICE RÉSEAU

     

    Thread information:

        Thread ID: 5

        Thread account name: AUTORITE NT\SERVICE RÉSEAU

        Is impersonating: False

        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.GetAllEmbeddedSkins(RadSkinManager skinManager)

       at Telerik.Web.UI.RadSkinManager.FillSkins(RadComboBox chooser)

       at Telerik.Web.UI.RadSkinManager.OnInit(EventArgs e)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

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


    Thanks :-)

    Dider
  7. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 28 Oct 2011 Link to this post

    Hello Didier,

    This exception could happen also in case you have set the AppSettings["Telerik.Web.SkinsAssembly"] to an empty string. Please, check that. In addition, did you upgrade to the latest version of the controls, is the result the same?


    Regards, Tsvetoslav
    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
  8. Didier
    Didier avatar
    13 posts
    Member since:
    Jan 2008

    Posted 28 Oct 2011 Link to this post

    Hi,

    We get the problem wit both versions 2011.2712.40 and 2011.2.915.40. This morning there was 2 errors caused by MSN bot during the night when it was browsing www.atxoom.com. This website uses  2011.2.915.40. I made a special copy of the web.config here: www.atxoom.com/web.config.txt . There is no reference to Telerik.Web.SkinsAssembly in AppSettings.

    Yesterday, before submitting my comment, I tried to add <add key="Telerik.Web.SkinsAssembly" value="Telerik.Web.SkinsAssembly" /> as suggested in an other article from Telerik community website but it gave troubles as we are using skins (!):
    Thread information:

        Thread ID: 19

        Thread account name: x

        Is impersonating: False

        Stack trace:    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

       at System.Reflection.Assembly.Load(String assemblyString)

       at Telerik.Web.SkinRegistrar.GetAllEmbeddedSkins(RadSkinManager skinManager)

       at Telerik.Web.UI.RadSkinManager.FillSkins(RadComboBox chooser)

       at Telerik.Web.UI.RadSkinManager.OnInit(EventArgs e)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

       at System.Web.UI.Control.InitRecursive(Control namingContainer)

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


    From now we are running with: <add key="Telerik.Web.SkinsAssembly" value="DISABLED" /> (as suggested in the previously mentioned article). I'll tell you within a few days if this particular web still get problems :-)

    Our Masterpage looks like this:
    <form id="form1" runat="server">
       
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
     
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>
      
        <telerik:RadSkinManager ID="RadSkinManager1" Runat="server"></telerik:RadSkinManager>
     
     
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1" clientevents-onrequeststart="OnResponseStart" clientevents-onresponseend="OnResponseEnd">
     
            <div class="Container">
            ..... .... ..... ....
            </div>
      
            <telerik:RadWindowManager ID="RadWindowManager1" modal="true" showcontentduringload="true" animation="None" visiblestatusbar="false"
                behaviors="Move" runat="server"></telerik:RadWindowManager>
      
        </telerik:RadAjaxPanel>
        <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" />
     
    </form>

    Best regards,

    Didier

  9. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 30 Oct 2011 Link to this post

    Hi Didier,

    We will be awaiting your feedback.

    Greetings, Tsvetoslav
    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
  10. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 17 Nov 2011 Link to this post

    I'm seeing this with 2077.2.915.40.

    It's happened only 2 or 3 times on a pretty busy site (10,000-15,000 page requests per day), and I've never seen it on any of the other site that utilize the same code base. 

    I was just looking to see if this was a known problem.  Sorry I don't have any good input other than to report that I've seen this, too.
  11. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 18 Nov 2011 Link to this post

    Hi all,

    I am glad to inform you that our development team managed to track the issue and a fix for that will be available in the next latest internal build of the controls that is coming out by the middle of next week. Thanks for the cooperation - the telerik points of all the participants in the forum discussion who have reported the issue have been updated accordingly.

    Regards, Tsvetoslav
    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
  12. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 18 Nov 2011 Link to this post

    Excellent news.  Good job as always Telerik!
  13. Ang Lim
    Ang Lim avatar
    5 posts
    Member since:
    Jun 2012

    Posted 24 Nov 2011 Link to this post

    Hi  Tsvetoslav, is the fix for Item has already been added. Key in dictionary: 'Telerik.Web.SkinsAssembly'  Key being added: 'Telerik.Web.SkinsAssembly' been released?

    Thanks
  14. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 25 Nov 2011 Link to this post

    Hi Ang Lim,

    Yes, the latest internal build of the controls does contain the fix for the issue.

    Greetings, Tsvetoslav
    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
  15. John
    John avatar
    2 posts
    Member since:
    Oct 2011

    Posted 23 Dec 2011 Link to this post

    So what version number contains the fix?
  16. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 27 Dec 2011 Link to this post

    Hi,

    The fix in question is still not available in any of the official versions of RadControls for ASP.NET AJAX. However you can download the Latest Internal Build from your account and use it while the release of the Q3 2011 SP.

    Kind regards,
    Iana Tsolova
    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
  17. Andreas
    Andreas avatar
    143 posts
    Member since:
    May 2008

    Posted 04 Jun 2012 Link to this post

    Hi,

    We are using the 2012 Q2 beta and are gettting these errors at random!
    Is this issue really solved or is it back again?

    System.ArgumentException: Item has already been added. Key in dictionary: 'Telerik.Web.SkinsAssembly'  Key being added: 'Telerik.Web.SkinsAssembly'
       at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
       at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd(String name, Object value)
       at Telerik.Web.SkinRegistrar.GetDefaultSkinsAssemblyName()
       at Telerik.Web.SkinRegistrar.GetAllEmbeddedSkinAttributes(RadSkinManager skinManager, Type controlType)
       at Telerik.Web.SkinRegistrar.GetRuntimeSkin(ISkinnableControl control)
       at Telerik.Web.UI.RadGrid.ResolveGridImageUrl(String imageName, Boolean canBeSpriteButton)
       at Telerik.Web.UI.GridColumn.InitializeCell(TableCell cell, Int32 columnIndex, GridItem inItem)
       at Telerik.Web.UI.GridTemplateColumn.InitializeCell(TableCell cell, Int32 columnIndex, GridItem inItem)
       at Telerik.Web.UI.GridHeaderItem.Initialize(GridColumn[] columns)
       at Telerik.Web.UI.GridItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows)
       at Telerik.Web.UI.GridTableView.CreateHeaderItem(Boolean useDataSource, GridColumn[] copiedColumnSet, GridTHead thead)
       at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource)
       at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource)
       at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
       at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
       at Telerik.Web.UI.GridTableView.PerformSelect()
       at Telerik.Web.UI.GridTableView.DataBind()
       at Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason)
       at Telerik.Web.UI.RadGrid.OnLoad(EventArgs e)
       at Caesar.Web.UI.WebControls.Grid.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  18. Ang Lim
    Ang Lim avatar
    5 posts
    Member since:
    Jun 2012

    Posted 04 Jun 2012 Link to this post

    I downloaded the Latest Internal Build but it doesn't fix the problem.
  19. Jorge
    Jorge avatar
    1 posts
    Member since:
    Jul 2010

    Posted 05 Jun 2012 Link to this post

    We are seeing the issue as well.
    Our Version=2012.1.215.35
    Anyone have any additional thoughts on this?
  20. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 06 Jun 2012 Link to this post

    Hi Eliyahu, hello Ang,

    Are you using the default Telerik.Web.UI.Skins assembly or you have embedded skins disabled? Is the page with RadGrid on it under a intense user traffic?

    Please, provide information on the above questions.


    Regards,
    Tsvetoslav
    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.
  21. Ang Lim
    Ang Lim avatar
    5 posts
    Member since:
    Jun 2012

    Posted 06 Jun 2012 Link to this post

    I use embedded skins disabled and the traffic is not that intense.

    Thanks
  22. Andreas
    Andreas avatar
    143 posts
    Member since:
    May 2008

    Posted 06 Jul 2012 Link to this post

    Hi,

    Still get this error with latest internal.
    Seems to happen easily on startup of the web-application if lots of simultaneous users are requesting a page.
    Something isn't thread safe?

    Regards
    Caesar
  23. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 11 Jul 2012 Link to this post

    Hi Andreas, hello Ang,

    Obviously the web server is not able to handle properly multiple access to the same AppSettings variable so our development team has decided to consider alternative ways to avoid the thread conflicts such as implementing a thread lock on the problematic piece of code. We will be getting back with more information when the fix is ready.

    Greetings,
    Tsvetoslav
    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.
  24. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 11 Jul 2012 Link to this post

    Hi all,

    Our development team decided to go with the thread locking solution and the fix has already been implemented. Please, download the next latest internal build of the controls that should be out by the end of the current week or the beginning of the next one.

    Regards,
    Tsvetoslav
    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.
  25. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 18 Dec 2012 Link to this post

    Hi,

    We experienced the same error today.  We have an internal web application with around 300 concurrent users.  As far as I know, only one user had the error, but it stopped them being able to work and would like to stop it being repeated.

    Is the fix for this available in a production release yet?

    Thanks,

    Craig
  26. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 19 Dec 2012 Link to this post

    Hello Eliyahu,

    Yes, it is available since the Q3 2011 release.

    Greetings, Tsvetoslav
    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