none
an item with the same key has already been added c# RRS feed

  • Question

  • I am getting this error randomly at the production server here is the stack trace of the error. I am 
    using linq to sql (Telerik) and .net 4.0

    Error:An item with the same key has already been added.
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Telerik.OpenAccess.DBRegistry.GetDatabase(String urlOrConnectionId, Configuration& 

    configuration)
       at Telerik.OpenAccess.Database.Get(String connectionString, BackendConfiguration 

    backendConfiguration, MetadataContainer metadataContainer)
       at Telerik.OpenAccess.OpenAccessContextBase.GetScope()
       at Access.AccessFramework.AppRelated.GetWebServiceByCode(String webserviceCode)
       at Access.AccessFramework.AppRelated.AddWebServiceLogEntry(String clientAppCode, String 

    ipAddress, String webserviceCode)
       at AccessFramework.WebServices.ServiceAuth.GetEServiceByCode(String CallerAppId, String 

    AuthorizationKey, String EServiceCode, String UserName)

    Below is the code for  AccessFramework.WebServices.ServiceAuth.GetEServiceByCode(string webserviceCode):

    private DWA0202WEBSERVICE GetWebServiceByCode(string webserviceCode)
    {

    EntitiesModel context = EntityContext.GetAccessContext();
                DWA0202WEBSERVICE srv = (from c in context.DWA0202WEBSERVICEs where c.DWA0202WEBSERVICE_CODE == webserviceCode select c).SingleOrDefault();

    }

    Below is the GetAccessContext method:

    public class EntityContext

    {

    static EntitiesModel _appAccessContext;

    public static EntitiesModel GetAccessContext()

    {

    _appAccessContext = new EntityModel();

    return _appAccessContext

    }

    }

    Any body help on this issue please ?


    IE 255 char path

    • Moved by CoolDadTx Friday, April 12, 2019 1:54 PM Third party product
    Friday, April 12, 2019 9:39 AM

All replies

  • Hello,

    This may be an issue with Telerik, I suggest using their support system.

    https://www.telerik.com/support


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Friday, April 12, 2019 11:10 AM