Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using VFP com components from ASP pages
Message
De
26/09/2000 10:03:35
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00420749
Message ID:
00420893
Vues:
21
Thanks everybody for the responses. Larry, thanks for the insight on MTS. I had been considering running the components under MTS, so that I could unload them for modifications without shutting down IIS. I now realize that any component that runs under MTS must be completely stateless.

Thanks again
Bill Sabo

>AFAIK, you are okay in this approach if you don't use MTS.
>
>When IIS services an ASP request, it spawns a thread for this. Single-threaded and Apartment threaded applications (VFP's choices) are limited to the environment that exist on that thread.
>
>If another user accesses the same page at the same time, IIS will spawn two threads and each thread will create its own copy of the COM object. Neither user will be able to access (or even be aware of) the other user's activities.
>
>If MTS were involved, that would be a different story. MTS would handle the COM object creation and pass a proxy stub back to the ASP page. Each COM request (property setting, method call) would need to get a reference from MTS. MTS may create several COM objects to handle several requests simultaneously, but it will manage them internally. This means that the COM object you start with in COM call 1 may not be the COM object you end up with in COM call 3. It is stateless!
>
>HTH.
>
>FWIW, you may want to look at another way of doing this. If the page in question is going to be hit a lot, performance may become an issue because you are constantly instantiating and destroying an object. This may be a reason to implement your COM server as a Session variable that is created when the user first enters your site.
>
>For more information on this issue and the entire VFP COM and ASP subject, you can take a look at Rick Strahl's article on the subject. http://www.west-wind.com/presentations/aspobjects/ASPObjects.htm
>
>Good luck!
>
>>Hi
>>
>>I have a question on the use of VFP com components from asp pages. The question is regarding multi-threaded com servers that have page level scope - where the object is created and destroyed on the same asp page. (I am not trying to maintain state between requests). With components of this type, is it acceptable to do the following from an asp page:
>> - instantiate the com server
>> - set some object properties
>> - call a method
>> - check the value of one or more object properties set by the method
>>I don't understand how vfp will handle multiple users accessing the page/component and attempting to access the same pem's simultaneously. Are multiple users each working with their own independent instance of the com server, or will one user's property settings change the values for another user?
>>If an asp page calls a component method, is it possible for the method to call other class methods before returning a value to the asp page, or does all logic have to be contained within a single method call?
>>
>>Thanks and regards
>>Bill Sabo
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform