SolutionBase: Component Services Administration

Learn how to administer COM+ objects.

Microsoft's Component Object Model (COM) provides a cross-platform architectural framework for applications that enables developers to create modular applications from components provided by different vendors. COM is the underlying technology behind OLE and other services that enable document and data sharing, custom controls, and other cross-application features. COM+ is an extension of COM that adds system services to support applications that need to share data and interoperate in other ways. COM+ is primarily geared toward interapplication communication. The Component Services Administrator in Windows Server 2003, like its Windows 2000 Server counterpart, enables you to configure COM and manage COM+ applications.

What is it for?
The Component Services Administration console provides a common interface that you can use to configure and administer COM components and COM+ applications. Common tasks you accomplish with the console include:
  • Configuring the system for component services—You can use the Component Services Administration console to configure security roles for the System Application, which manages the configuration and application deployment within Component Services. You can also use the console to add other computers to the console tree for management and to enable or disable DCOM, which determines whether COM components can communicate across the network with other computers.
  • Installing and replicating COM+ applications—Creating a new COM+ application includes (optionally) creating a partition for it, configuring security and application roles, and setting other properties to define the application's behavior. You can accomplish these tasks through a wizard in the Component Services Administration console or through scripts. You can also export COM+ applications and application proxies for installation on other computers. Microsoft provides the Comrepl command line tool to replicate all COM+ applications between computers.
  • Administering application pooling and recycling—You use the Component Services Administration console to configure pooling and recycling for COM+ applications. Pooling enables multiple server processes to act as a single application, which ultimately provides for scalability and reliability. Application recycling enables a process to be replaced by a duplicate process, after which the original process is shut down and its resources recovered. Recycling provides recoverability and improves performance by shutting down failing processes.
  • Configuring application security—COM+ applications run in the context of security roles that enforce access control for the application. You use the Component Services Administration console to assign users and groups to specific roles, configure access security checking, set the software restriction policy for an application, configure authentication for COM+ applications, set application identity and impersonation, and configure computer-wide authentication and security settings.
  • Administering the COM+ SOAP Service—Through the console you can expose components in COM+ applications as XML Web services, configure security for XML Web services, and import and export SOAP-enabled applications between servers.
  • Administering distributed transactions—COM+ relies on the Distributed Transaction Coordinator (DTC) service to manage transactions between message queues, databases, and other resources whether locally or across the network. You use the console to configure DTC networking, logging, security, and related properties, as well as to monitor DTC performance, logging, and other DTC-related tasks.
  • Configuring COM+ application debugging—Through the console you can enable or disable process dump for each COM+ application and specify the criteria that determine how and when the process dump takes place.
  • Administering application queuing—The COM+ Queued Components Service provides a queued transaction model for communication between client and server. With the Component Services Administration console you can specify a COM+ application as queued, specify the queue listener for an application, set the maximum number of listener threads, and specify the authentication protocol for communications.

Many of the tasks that you can perform with the Component Services Administration console can also be accomplished with scripts or programmatically. However, the console presents a consistent and easily understood GUI for accomplishing those tasks.

Touring the Component Services Administration console
A shortcut to the Component Services Administration console is included in the Administrative Tools folder. You can also add the Component Services snap-in to any custom console.

When you open the Component Services Administration console, you'll find that it contains a typical console tree pane on the left and a details pane on the right (Figure A). The console tree includes not only the Component Services branch, but also the Active Directory Users And Computers, Event Viewer, and Services snap-ins. I'll focus here on the Component Services branch.

Figure A
The default Component Services Administration console

By default, the console tree pane includes the following four containers:
  • COM+ Applications—This branch contains all of the COM+ applications installed on the computer. You'll find several applications installed on a stock server, including the System Application, IIS Out-of-Process Pooled Applications, and a handful of others. Each application is represented by its own subbranch, with additional subbranches including Components, Roles, and for some applications, Legacy Components. You use the COM+ Applications branch to add and remove COM+ applications, view and modify component properties, set general application properties (security, identity, etc.), add components for an application, add subscriptions, and generally control all aspects of an application and its components.
  • DCOM Config—This folder enables you to configure settings such as authentication level and security permissions for individual COM applications. Each application appears in the list as a separate node.
  • Distributed Transaction Coordinator—This branch includes two nodes. The Transaction List node shows the transactions in which the computer is currently participating. The Transaction Statistics node displays speed, response time, and other statistics for transactions in which the computer is participating.
  • Running Processes—This folder lists all of the COM+ application processes currently running on the computer. You can also dump the application through this branch for troubleshooting and debugging.

By default, the Component Services Administration console does not display COM+ partitions, which are the containers into which COM+ applications are installed. There is a single Base Application Partition by default, which contains the COM+ Applications folder I described above (Figure B).

Figure B
The console can optionally show COM+ application partitions.

These partitions, in part, serve much the same purpose that Active Directory containers serve, enabling you to organize applications into logical groups for management purposes. For example, you can use partitions to control access to COM+ applications and components based on Active Directory membership. Partitions also enable multiple instances of a given COM+ application to run with different configurations on a single computer.

To turn on or off display of COM+ partitions, right-click My Computer in the console tree pane and choose Properties, click the Options tab, and select or deselect the option Enable Partitions. If you prefer to place all applications in the default partition, there is no real reason to enable display of partitions. However, if the server hosts multiple applications, partitioning can help you separate them for easier administration.

What's different from Windows 2000 Server?
You'll notice several differences between the Component Services Administration console in Windows Server 2003 and Windows 2000 Server, including many significant new features. These new features include the following:
  • Application pooling—Application pooling enables you to specify multiple server processes to act as a single application. Application pooling offers the benefit of multithreading to nonthreaded applications. It also provides increased reliability because if one process in the pool fails, the other processes can continue to run unaffected. You configure application pooling through the properties for each individual COM+ application.
  • Application recycling—If a process begins to fail, it can be replaced by a duplicate process that then takes on new requests. The old process finishes processing existing requests, and when finished, is terminated and its resources recovered. Application recycling therefore improves reliability and recoverability from such potential problems as memory leaks or resource allocation issues. You configure application recycling through the properties for each individual COM+ application.
  • COM+ partitions—In addition to providing a means for logically grouping COM+ applications, partitions also enable you to run multiple instances of a single application with different configurations on the same computer. This eliminates the need to run the application on separate servers and can help with server consolidation.
  • COM+ SOAP Service—This new service enables clients to access COM components through XML and SOAP (Simple Object Access Protocol) and make COM+ applications available across the network as XML Web services. Support for XML and SOAP can therefore simplify client access, speed application development and delivery, and enable you to integrate COM more fully with your other Web services.
  • Low-memory activation gates—Before starting a COM+ server or component, Component Services now checks the percentage of available virtual memory, and if that amount falls below a set threshold, activation of the object fails. This can help alleviate performance and reliability problems caused by memory allocation failures. Low-memory detection applies only to COM components installed in a COM+ application.
  • Pause/resume and disabling of applications—Components Services in Windows Server 2003 allows COM+ applications to be paused to prevent further application activations without affecting currently running processes. You can also disable an application to achieve the same result.
  • Process dumping—You can dump the state of a process without first terminating the process. This capability facilitates troubleshooting and debugging.

Administrative wizards
The Component Services Administration console provides two wizards to help you manage partitions and applications.

COM+ Partition Install Wizard
This wizard (Figure C) helps you create a new COM+ partition or import a partition you have exported from another computer. If you choose the option to install a previously exported partition, the wizard prompts you for the location of the MSI file created during the export process.

Figure C
The COM+ Partition Install Wizard helps you create COM+ partitions.

If you choose to create a new partition, the wizard prompts for the following information:
  • Name—This is the partition name as it appears in the Component Services Administration console.
  • Partition ID—This is a Globally Unique ID (GUID) for the partition.

To create a partition in the Active Directory, you must first create the partition using the Active Directory Users And Computers console. Then, you link the AD partition to the partition you create with the Component Services Administration console. To do so, you specify the same name and GUID in Component Services as in the AD Users And Computers console, or simply click Browse in the COM+ Partition Install Wizard to browse the AD for the previously created partition.

COM+ Application Install Wizard
This wizard (Figure D) helps you add a new COM+ application or import an application you have exported from another computer. If you choose the option to install a pre-built application, the wizard prompts you for the location of the application's MSI file. This is also the option to choose when importing an application.

Figure D
Use the COM+ Application Install Wizard to add or import an application.

If you choose to create a new application, the wizard prompts for the following information:
  • Name—This is the name of the application as it appears in the Component Services Administration console.
  • Activation type—Choose Library Application to have components activated in the hosting application's process. Choose Server Application to have components activated in a dedicated server process.
  • Account—Specify the account under which the application's components will run. You can choose Interactive User, Local Service, Network Service, or a specific user account.
  • Application roles and users—The wizard enables you to add application roles and add users to each role. You can also add roles and manage users after installing the application.