IIS is a thread server, and every ASP is a thread. Therefore, the application must meet this requirement across sessions. Unfortunately, VB is a development tool for advanced applications and does not support cross-threaded components. It can only write single-threaded components. This is especially true for monkey vbs. Cross-thread is not allowed for objects defined by class in vbs.
To break through this point, you must use low-level development tools such as Vc and CB, and manually define interfaces, idispatch, iunknown, uid, and so on, even if vs.net 2005, in cb6.
The following is a reference of CB to illustrate the differences between various components.
Automation objects can have one of the following:
Single only one client thread can be serviced at a time. com serializes all incoming callto enforce this. Your code needs no thread support.
Apartment each object instantiated by a client is accessed by one thread at a time. you must protect against multiple threads accessing global memory, but objects can safely access their own instance data (object properties and members ).
Free each object instance may be called by multiple threads simultaneously. You must protect instance data as well as global memory.
Both this is the same as the free-threaded model, doesn t that all callbacks supplied by clients are guaranteed to execute in the same thread. this means you do not need protect values supplied as parameters to callback functions.
Neutral multiple clients can call the object on different threads at the same time, But Com ensures that no two CILS conflict. you must guard against thread conflicts involving global data and any instance data that is accessed by more than one method. this model shoshould not be used with objects that have a user interface. this model is only available under COM +. under COM, It is mapped to the apartment model.
Do not go into this issue too deeply, cProgramThe salary difference between employees and ASP programmers is obvious. When I want to use C to compile the required components, no one is willing to return to the cheap ASP project.