Hi Mark,
Maybe you want to check out my article in the July issue of FoxPro Advisor.
For performance reaons, IIS maintains a set of worker threads, but the precise number can vary. With a busy site, the number of threads increases. If they have been idle for some time, some threads are terminated. Each of these threads has got an STA, a single threaded apartment. In each STA each MTDLL gets its own environment using Thread Local Storage which affects all the settings in VFP. You really should see the 10 threads as 10 instances of VFP. Different DLLs in the same STA do not share an instance. If you have A.DLL and B.DLL, create 10 objects of each DLL and IIS happens to instantiate them in 10 different threads, you have 20 copies of VFP running. However, if you instantaiate class A and class B that are both stored in C.DLL, they share the same instance.
To make it short: All classes stored in the same DLL with the same ThreadID do share a common environment. That's the reason why we have the Session class and use private datasession for objects in COM server.
Christof
--
Christof