As I had stated in the other forum post:Shalex wrote:make sure that the same connection object in your code is not used in several threads simultaneously;
"This exception occurs within the execution path of a single thread....In our current code, we create a data context at the beginning of an operation, and dispose of it when we commit the transaction. We create and destroy multiple data contexts for the duration of the operation. However, we only have one active data context on a thread at any given time, and a thread only ever uses that one data context."
We had tied the data context to the thread id. I don't know how you are implementing threads in your code base, but I've wondered if this is related to some managed/unmanged thread issue. I assure you, we were only using a single data context on a thread at a time. Both the Array List exception, and the GCHandle exception were encountered in code that used one data context per thread at a time.