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

Unable to copy configuration value with null key. The original KeyValuePair was [, ]

6 Answers 106 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hammad
Top achievements
Rank 1
Hammad asked on 13 Oct 2011, 11:06 AM
Hi guys,

I am using Telerik ORM 2010.2.1013.8 with .NET 3.5 Web Application deployed on windows server 2003 IIS 6.0

after some days ( not sure exactly how many days) this error appears

Unable to copy configuration value with null key. The original KeyValuePair was [, ]

Telerik.OpenAccess.OpenAccessException: Unable to copy configuration value with null key. The original KeyValuePair was [, ]

[OpenAccessException: Unable to copy configuration value with null key. The original KeyValuePair was [, ]]
   Telerik.OpenAccess.SPI.PropertySet.CopyTo(PropertySet target) +203
   Telerik.OpenAccess.Config.ConfigManager..ctor(Assembly[] _rootAssemblies, String con, XmlElement _configOverride, XmlElement gen, Assembly _callingAssembly, BackendConfiguration beConfig) +254
   Telerik.OpenAccess.SPI.Backends.CreateRuntimeConfigManager(String connectionId, XmlElement configOverride, Assembly[] entryAssemblies, Assembly callingAssembly, BackendConfiguration props) +406
   Telerik.OpenAccess.DBRegistry.GetDatabase(String urlOrConnectionId, XmlElement configOverride, Assembly[] entryAssemblies, Assembly callingAssembly, MetadataContainer metaContainer, BackendConfiguration beConfig) +251
   Telerik.OpenAccess.BackendConfiguration.GetDatabase(String name, Assembly calling, MetadataContainer metadataContainer, DBRegistry reg) +395
   Telerik.OpenAccess.Database.Get(String connectionString, BackendConfiguration backendConfiguration, MetadataContainer metadataContainer) +68
   Telerik.OpenAccess.OpenAccessContextBase.GetScope() +46
   Telerik.OpenAccess.OpenAccessContext.GetAll() +42
.......

When i re-upload the DLL of my web application project it starts to work again, note that even re-uploading exactly the same build DLL  solves this issue

any insight?

6 Answers, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 18 Oct 2011, 03:01 PM
Hello Hammad,

This exception indicates some invalid configuration in the 'BackendConfiguration'  instance in the context class. Has there been any change to the configuration? Do you have any steps which I can use to reproduce this exception?

Looking forward to resolving this issue soon.

All the best,
Ady
the Telerik team

Check out the latest stable build of Telerik OpenAccess ORM. Download it and benefit from our new Project Templates.

0
Erik
Top achievements
Rank 2
answered on 13 Sep 2012, 10:29 AM
We are having exactly the same issues.
This error appears out of the blue. Even on a web application that has been running smoothly for days.
Sometimes resetting IIS 'fixes' the issue. But sometimes we need to rebuild our project and replace the DLL's on the webserver. The behavior seems to be completely random. Sometimes it even takes 2-3 IIS resets for the application to work again.
We've used OpenAccess for over a year and never had this issue. But after upgrading to v2012.2.628.2 it happens to almost every project.

Regards,

Erik
0
Ady
Telerik team
answered on 13 Sep 2012, 03:12 PM
Hello Erik,

 This seems to be a multi-threaded issue. We will look into making the concerned code thread-safe. Do you by any chance have a sample project where you face this error and can send us this project? I would like to try and reproduce this strange behavior.

All the best,
Ady
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
0
Helder
Top achievements
Rank 1
answered on 21 Sep 2012, 09:21 AM
I have the problem. But i cant reproduce problem.
0
Can
Top achievements
Rank 1
answered on 03 Sep 2016, 10:01 PM

I started to get this error after moving "some" of the code that does the fluent mapping to a different project than the MetaDataSource, Context and Classes.

 

The code I moved reads the connection string from web/app.config creates BackendConfiguration and feeds it to the Context and MetaDataSource. Note that, because the configuration had to be available during pre-compile time, I could not use ConfigurationSection. I did it with File Read and parsing XML.

 

It was fine for a week, than I started to get this error in production (~10 people are using it in parallel)

 

Do these infos ring any bell? I really need to solve this issue.

0
Ady
Telerik team
answered on 07 Sep 2016, 03:32 PM
Hello Can,

 Can you send us a sample solution that demonstrates the setup you have - How the projects reference each other and how most importantly how you obtain the BackendConfiguration instance?

Does the error occur consistently? This seems to be a very hard to reproduce error.

Regards,
Ady
Telerik by Progress
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Tags
General Discussions
Asked by
Hammad
Top achievements
Rank 1
Answers by
Ady
Telerik team
Erik
Top achievements
Rank 2
Helder
Top achievements
Rank 1
Can
Top achievements
Rank 1
Share this question
or