Re: Using STA API in a MTA enviroment

Discussion in 'ASP .Net' started by =?Utf-8?B?UmF1bA==?=, Sep 17, 2004.

  1. No, i'm not using COM, i'm using DLL Import and you are right STA, MTA are
    COM therms but what i ment when saying Single Thread is that when i perform 2
    actions in the same time my web service dies. So try it's not a COM thing
    rather then the concept of Single Threaded(can't work with more threads in
    the same time) :)

    Yes, aspcompat was one of the first things i tried but i'm using another
    class that makes impersonation(again DLL Import but to the Win32 API this
    time) and this time the Win API needs a Mutli Threaded enviroment(basicaly
    doesn't work with that setting).

    My problem is that as long as the DLL is loaded once i need to have
    syncronization - so i loose performance(there can be long running tasks that
    take 2-3 minutes). So i NEED more processes. There is no way arround it - so
    i'v seen until now.

    My propblem would be solved if i could make COM+ spawn as manny
    processes(ddlhosts) i tell it to - but that's not possible as far as i
    know(not with Enterprise Services for sure since i tried). But then if i have
    i process for each call i could end up havving to manny of them and time is
    lost with the creation of the process and loading all the DDLs and so on...
    So i need to control how manny processes i have, somehow.

    I hope someone can help me with some simple solution becouse i'v started
    already on a C/S solution that uses sockets and it's not as easy as it seamed

    I hope i gave you more info now.

    "Scott Allen" wrote:

    > Hi Raul:
    > STA and MTA are related to COM. Are you saying you have an STA COM
    > object implemented in C ?
    > If you have an STA component, you don't need to perform any locking on
    > an object. COM performs the synchronization for you.
    > What you might need to do however, is set aspcompat="true" in the
    > @Page directive. If this component is an STA component it causes the
    > call to move from an MTA thread running the ASP.NET page into the STA
    > thread your component has an affinity for.
    > --
    > Scott
    =?Utf-8?B?UmF1bA==?=, Sep 17, 2004
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tormod Hystad
    Tormod Hystad
    Jul 4, 2003
  2. George2

    STA component call MTA component

    George2, Mar 30, 2008, in forum: C Programming
    Mar 30, 2008
  3. Daniel Cuculescu

    deadlock when using waitOne in a STA thread

    Daniel Cuculescu, Jun 5, 2008, in forum: ASP .Net
    Daniel Cuculescu
    Jun 5, 2008
  4. Paul

    TNA or MTA sample

    Paul, Sep 6, 2003, in forum: ASP General
  5. Ferrous Cranus
    Sep 23, 2013

Share This Page