Jim,
>Our website sproradically gets an "Item has already been added. Key in dictionary:" error. I have tracked it down to the OakLeaf.MM.Main.Managers.mmDatabaseManager.GetConnectionString(String databaseKey) method calling System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add). I have a feeling that two website users are attempting to access a database key for the first time at the same time and one of them is inserting the key into the cache before the other user and the second user is getting this error. Does anyone else have this problem?
I haven't seen this before...are you using MM .NET version 2.2? The GetConnectionString method uses code that retrieves a thread-safe version of the ConnectionString HashTable before checking if the value already exists and adding the connection if it doesn't.
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com