XML Web Services and Apartment-Threaded COM Components
This topic is specific to a legacy technology. XML Web services and XML Web service clients should now be created using Windows Communication Foundation.
XML Web services can call apartment-threaded COM components using the COM interoperability layer, but only if the component is registered as a COM+ library application or if the component is registered in a COM+ server application that resides on a computer that is running Windows 2000 Service Pack 2 or later.
For details about registering COM+ applications, see either the COM+ Explorer help documentation (for Windows 2000) or the Component Services Administration help documentation.
When you call apartment objects from XML Web services, remember the following points:
The ASPCOMPAT attribute is not supported. Because ASPCOMPAT is not supported, your component object cannot require ASP intrinsic objects.
Although you can use other methods to call apartment objects from XML Web services, and these methods may appear to function correctly, these methods are neither tested nor supported.
If you want to run your Web services in multi-threaded apartments (MTAs), calls to your apartment object are made by a single-threaded apartment thread. COM+ creates the proxy and stub and also handles the marshalling from the MTA in which the Web service resides to the single-threaded apartment (STA) in which the apartment object resides.