+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Error when creating libraries

Error when creating libraries

9 posts, 0 answered
  1. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    04 Apr 2008
    Link to this post
    Hi telerik,

    I'm getting the following error when creating or updating a library (image).

    The given key was not present in the dictionary.

    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.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

    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:

    [KeyNotFoundException: The given key was not present in the dictionary.]
       System.ThrowHelper.ThrowKeyNotFoundException() +28
       System.Collections.Generic.Dictionary`2.get_Item(TKey key) +2668548
       Telerik.Cms.Engine.Data.MetaData.get_Info() +89
       Telerik.Cms.Engine.Data.ContentVersion.get_MetaData() +268
       Telerik.Cms.Engine.Data.ContentVersion.VerifyObject() +60
       Nolics.ORMapper.Base.OdbClassHelper.VerifyClass(IOdbClass cl) +38
       Telerik.Cms.Engine.Data.ContentVersion.Nolics.ORMapper.Base.IOdbClass.BeginCommit() +10
       Nolics.ORMapper.Base.Transaction.Commit(Boolean fCleanIfSuccess) +754
       Nolics.ORMapper.Base.Transaction.Commit() +10
       Telerik.Cms.Engine.Data.Providers.DefaultProvider.BulkUpdate(IList list, Predicate`1 predicate) +245
       Telerik.Cms.Engine.ContentUrlRewriterService.Initialize() +424
       Telerik.Web.UrlRewriterService.GetService() +174
       Telerik.Cms.Engine.ContentUrlRewriterService..cctor() +77
    
    [TypeInitializationException: The type initializer for 'Telerik.Cms.Engine.ContentUrlRewriterService' threw an exception.]
       Telerik.Cms.Engine.ContentUrlRewriterService.ContentManager_Executed(Object sender, ExecutedEventArgs e) +0
       Telerik.ManagerBase`1.OnExecuted(Object sender, ExecutedEventArgs args) +110
       Telerik.Cms.Engine.Data.Providers.DefaultProvider.OnExecuted(ExecutedEventArgs args, Boolean fireEvents) +37
       Telerik.Libraries.Data.DefaultProvider.OnExecuted(ExecutedEventArgs args, Boolean fireEvents) +11
       Telerik.Cms.Engine.Data.Providers.DefaultProvider.OnExecuted(ExecutedEventArgs args) +9
       Telerik.Libraries.Data.DefaultProvider.SaveLibrary(ILibrary library) +243
       Telerik.Libraries.LibraryManager.SaveLibrary(ILibrary library) +27
       Telerik.Libraries.WebControls.LibraryEditor.SaveLibrary(String commandName) +649
       Telerik.Libraries.WebControls.LibraryEditor.button_Command(Object sender, CommandEventArgs e) +149
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +105
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +132
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

    When I'm refreshing the page, a library is created, but when updating the error appears again?

    Daniel
  2. Nikifor
    Nikifor avatar
    232 posts
    Registered:
    18 May 2013
    07 Apr 2008
    Link to this post
    Hi Daniel,

    This problem has been reported for the Community Edition and we were able to reproduce it. However, no such issue has been detected for the Standard edition. Could you please let us know which is the exact Sitefinity version you are using. Also, it would be really helpful if you could give us any specific details for reproducing this exception locally.

    Thank you for your cooperation.

    Regards,
    Nikifor
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    07 Apr 2008
    Link to this post
    Hi Nikifor,

    For as far as I know I'm using the standard edition? I've downloaded the file 'SiteFinity_3_2_SP1_dev.exe' from my Client.NET.

    The problem does only occur if I create libraries in projects that I upgraded. After this error I re-created the project and started with a new, fresh database (SQL Express). With this setup I didn't have the error.

    So, the problem is solved, for now, but maybe others have this issue?

    Daniel
  4. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    07 Apr 2008
    Link to this post
    Hello Daniel,

    Thank you for the details. We will try to reproduce the issue so we can determine what is causing it and hopefully, provide some fix for future releases.

    Thanks again,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. mexner
    mexner avatar
    98 posts
    Registered:
    06 Apr 2006
    02 May 2008
    Link to this post
    I am getting a very similar error. I can't access Sitefinity at all. Happened during an upload apparently...

    The given key was not present in the dictionary.

    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.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

    Source Error:

    Line 53:             plhDashboardItems.Controls.Clear();
    Line 54:
    Line 55: foreach (IPersonalizedDashboardItem item in GlobalDashboardItems.Instance.DashboardItems)
    Line 56: {
    Line 57: item.PersonalizationServiceUrl = PersonalizationServicePath;

    Source File: d:\IIS\Clients\CMS_SiteFinity_Sites\MBFAgency\Sitefinity\Admin\Default.aspx.cs    Line: 55

    Stack Trace:

    [KeyNotFoundException: The given key was not present in the dictionary.]
    System.ThrowHelper.ThrowKeyNotFoundException() +28
    System.Collections.Generic.Dictionary`2.get_Item(TKey key) +2668548
    Telerik.Cms.Engine.Data.Providers.GCSql2005Builder.SetSorting(List`1 conditions, DataRow queryData) +497
    Telerik.Cms.Engine.Data.Providers.GCSql2005Builder.EmitGCQuery(StmtContext context, DataRow queryData, Int32 maxRows, String groupName) +770
    Telerik.Cms.Engine.Data.Providers.GCSql2005Builder.EmitQuery(StmtContext context, DataRow queryData, Int32 maxRows, String groupName) +120
    Nolics.ORMapper.DataProviders.SQLBlockBuilder.ExecuteQuery(StmtContext context, DataRow queryData, Int32 maxRows, String group) +106
    Nolics.ORMapper.DataProviders.SQLDataProvider.ExecQuery(DataSet queries) +519
    Nolics.ORMapper.Base.QueryBase`1.LoadQuery(Int32 maxElements, Int32 fromElement) +275
    Nolics.ORMapper.Base.QueryBase`1.Load(Int32 maxElements, Int32 from) +8
    Telerik.Cms.Engine.Data.Providers.DefaultProvider.LoadQuery(Boolean join, Int32 from, Int32 max, String sortExp, Nullable`1 status, Guid[] parentIDs, IMetaSearchInfo[] filter) +1298
    Telerik.Cms.Engine.Data.Providers.DefaultProvider.GetContent(Int32 from, Int32 max, String sortExp, String tagName, Nullable`1 status, Guid[] parentIDs, IMetaSearchInfo[] filter) +255
    Telerik.Cms.Engine.ContentManager.GetContent(Int32 from, Int32 max, String sortExp) +119
    Telerik.News.NewsModule.GetRecentNews(Int32 rowPerPage) +80
    Telerik.News.NewsModule.GetRecentItems(String userName, Int32 count) +110
    Telerik.News.NewsModule.GetRecentItems(Int32 count) +38
    Telerik.Cms.Web.UI.Personalization.GlobalDashboardItems.GetRecentChanges(Int32 rowPerPage) +527
    Telerik.Cms.Web.UI.Personalization.GlobalDashboardItems.get_DashboardItems() +271
    Admin_Default.LoadDashboardRecentItems() in d:\IIS\Clients\CMS_SiteFinity_Sites\MBFAgency\Sitefinity\Admin\Default.aspx.cs:55
    Admin_Default.OnLoad(EventArgs e) in d:\IIS\Clients\CMS_SiteFinity_Sites\MBFAgency\Sitefinity\Admin\Default.aspx.cs:87
    System.Web.UI.Control.LoadRecursive() +47
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

  6. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    03 May 2008
    Link to this post
    Hello CHRIS mechsner,

    I am sorry that you are experiencing the problems with Sitefinity. Could you please send us your web.config file and provide answer to following questions:

    1. Which version of Sitefinity you are using?
    2. Was this an upgrade or clean install?

    Thank you for your understanding and patience.

    All the best,
    Ivan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. May
    May avatar
    36 posts
    Registered:
    12 Apr 2007
    17 Jun 2008
    Link to this post
    I got same error too and can't access Sitefinity admin error at all. We are using Sitefinity 3.2 standard, just updated from 3.1 with patch files
     

    Server Error in '/' Application.

    The given key was not present in the dictionary.

    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.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

    Source Error:

    The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

      <%@ Page Language="C#" Debug="true" %>

    or:

    2) Add the following section to the configuration file of your application:

    <configuration>
       <system.web>
           <compilation debug="true"/>
       </system.web>
    </configuration>

    Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

    Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

    Stack Trace:

    [KeyNotFoundException: The given key was not present in the dictionary.]
       System.ThrowHelper.ThrowKeyNotFoundException() +28
       System.Collections.Generic.Dictionary`2.get_Item(TKey key) +2585456
       Telerik.Cms.Engine.Data.Providers.GCSql2005Builder.SetSorting(List`1 conditions, DataRow queryData) +500
       Telerik.Cms.Engine.Data.Providers.GCSql2005Builder.EmitGCQuery(StmtContext context, DataRow queryData, Int32 maxRows, String groupName) +772
       Telerik.Cms.Engine.Data.Providers.GCSql2005Builder.EmitQuery(StmtContext context, DataRow queryData, Int32 maxRows, String groupName) +120
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.ExecuteQuery(StmtContext context, DataRow queryData, Int32 maxRows, String group) +106
       Nolics.ORMapper.DataProviders.SQLDataProvider.ExecQuery(DataSet queries) +496
       Nolics.ORMapper.Base.QueryBase`1.LoadQuery(Int32 maxElements, Int32 fromElement) +275
       Nolics.ORMapper.Base.QueryBase`1.Load(Int32 maxElements, Int32 from) +8
       Telerik.Cms.Engine.Data.Providers.DefaultProvider.LoadQuery(Boolean join, Int32 from, Int32 max, String sortExp, Nullable`1 status, Guid[] parentIDs, IMetaSearchInfo[] filter) +1302
       Telerik.Cms.Engine.Data.Providers.DefaultProvider.GetContent(Int32 from, Int32 max, String sortExp, String tagName, Nullable`1 status, Guid[] parentIDs, IMetaSearchInfo[] filter) +255
       Telerik.Cms.Engine.ContentManager.GetContent(Int32 from, Int32 max, String sortExp) +119
       Telerik.News.NewsModule.GetRecentNews(Int32 rowPerPage) +80
       Telerik.News.NewsModule.GetRecentItems(String userName, Int32 count) +110
       Telerik.News.NewsModule.GetRecentItems(Int32 count) +38
       Telerik.Cms.Web.UI.Personalization.GlobalDashboardItems.GetRecentChanges(Int32 rowPerPage) +531
       Telerik.Cms.Web.UI.Personalization.GlobalDashboardItems.get_DashboardItems() +271
       Admin_Default.LoadDashboardRecentItems() +91
       Admin_Default.OnLoad(EventArgs e) +17
       System.Web.UI.Control.LoadRecursive() +47
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
  8. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    25 Jun 2008
    Link to this post
    Hi May,

    Could you check whether you have updated your web.config as well? We believe it is a misconfiguration issue.
    Such an error may occur for example if you had a metafield in the previous version, but you didn't declare it after the update.

    All the best,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. May
    May avatar
    36 posts
    Registered:
    12 Apr 2007
    25 Jun 2008
    Link to this post
    Hi Georgi,

    I did update the web.config file.  You are right that the error is related to the web.config file. whenever I made mistake in web.config, the error will occur.

    Thank you very much!

    May
Register for webinar
9 posts, 0 answered