|
Well...it's hard to diagnose here, it's probably going to need to be setup by a support technician. My experience has been pretty heavy with .NET, interop, VB, COM and we've encountered a few places where threading and .NET static methods created unpredictable and unreliable code paths. It was odd too...because *sometimes* it would work, and other times it would fail.
What we ended up doing in those cases was making sure our .NET objects were created on the COM STA thread. There are some sophisticated ways of doing this, but there are also some pretty simple ones. What we did was create our .NET objects in the Startup of an IExtensions, and initialized our statics there. We also stopped stamping everything as static - that is, static methods, static classes, static classes with static methods - they lead to trouble when you realize that static initializers in .NET can be created on a separate thread quite easily, and more importantly unbeknown to the developer.
|