You are on page 1of 7

Creating COM+ Applications

This section describes how to create a new (empty) COM+ application and then add components to that application. It also describes how to add COM components to, and remove them from, existing COM+ applications, and how to move and copy components from one COM+ application to another.
Topic Description

Creating a New COM+ Application Installing New Components Importing Components Removing a Component from a COM+ Application Moving Components Copying Components Deleting a COM+ Application

Describes how to create a new COM+ application. Describes how to install new components. Describes how to import components. Describes how to delete a component from a COM+ application. Describes how to move a component from one COM+ application to another. Describes how to copy a component from one COM+ application to another. Describes how to delete a COM+ application.

For conceptual information on the procedures described in this section, see COM+ Application Overview and Deploying COM+ Applications. For procedural information on the administrative tasks involved in exporting and installing COM+ applications, see "Installing COM+ Applications" in the Component Services Administrator's Guide.
Related topics Automating COM+ Administration Configuring COM+ Applications Conversion of MTS Packages to COM+ Applications

Send comments about this topic to Microsoft Build date: 10/16/2012

(Note that the following special characters cannot be used in an application name: \. %. /. groups. 8.) Under Activation type. <. 5. Library applications can use role-based security but do not support remote access or queued components. point to New. *. {. as follows:   Creating an empty COM+ application (described below). click Library application or Server application. On the Welcome page of the COM+ Application Install Wizard. (The default selection for application identity is Interactive User. and . Click Next. '. By default. and then in the Install or Create a New Application dialog box. The interactive user is the user logged on to the server computer at any given time. click Next. Server applications can support all COM+ services. In the Add Users to Roles dialog box. If you select This user. In the box provided. type a name for the new application. ). (. You can also rightclick the COM+ Applications folder. and then click Application. type the user name and password. populate each role you created in the last step with the users. only the CreatorOwner role is defined. ]. ". add any roles you want to associate with the application. 6. You must also retype the password in the Confirm password box. or built-in security principals to which you want to grant . #. !. choose an identity under which the application will run. 2. }. In the Add Application Roles dialog box. Click Next. :.. You can select a different user by selecting This user and entering a specific user or group. The identity property is not used for library applications. ?. >. In the Set Application Identity dialog box. @. point to New. 7.Creating a New COM+ Application Creating a new COM+ application requires two basic steps. (See Installing New Components and Importing Components.. [.) To create an empty COM+ application 1. ~. 4. &. ^. A library application runs in the process of the client that creates it. . and then click Application. In the console tree of the Component Services administrative tool. Adding components to the application.) Note The Set Application Identity dialog box appears only if you selected Server application for the new application's activation type in the COM Application Install Wizard's preceding dialog box. On the Action menu. Note A server application runs in its own process. |. Select the COM+ Applications folder for that computer. click Create an empty application. 3. For information on roles. see Role-Based Security Administration. select the computer on which you want to create an application.

point to New. type the filename of the component to install or select a filename from the displayed list. you can either use the COM+ Component Install Wizard or drag . 9. or import components that have already been registered.) Alternatively. In the Install new components dialog box. and select the application in which you want to install the component(s). Click Open. 2. . access checks are enabled by default when creating a COM+ application. Click Finish. If you select the Details check box.dll files that contain the components from the Windows Explorer and drop them in the application. you can allow access to all users by disabling access checks on a COM+ application. click Next.) Installing New Components To add components to the Components folder of a COM+ application. The new application will now be displayed under the COM+ Applications folder in the console tree of the Component Services administrative tool. access to a COM+ application is allowed only to users that are in the roles associated with the application. Note As of Windows Server 2003. In the console tree of the Component Services administrative tool. (See Role-Based Security Administration.the privileges associated with that role. the interactive user is placed in the CreatorOwner role. To add a component to a COM+ application 1. point to New. Open the application folder and select Components. access checks were disabled by default at the application level. click Install new components . and then click Component. 7. Components can be added to empty applications or existing applications. you can either install a new component. On the Welcome page of the COM+ Application Install Wizard. In the Select files to install dialog box. and then in the Import or Install a Component dialog box. which registers the component on the computer. 6. you will see more information about file contents and the components that were found. On the Action menu. select the computer hosting the COM+ application. In previous versions. 5. If you use the COM+ Component Install Wizard. By default. click Add to browse for the component you want to add. (See Enabling Access Checks for an Application. and then click Component. After you add the files. The result is that by default. the Install new components dialog box displays the files you have added and their associated components. You can also rightclick the Components folder. Open the COM+ Applications folder for that computer. 4. 3.

select the computer hosting the COM+ application. Click Next. To import a component into a COM+ application 1. point to New. COM+ does not populate interface and method information for the component. In the Choose Components to Import dialog box. 8. If COM+ cannot find your component's type library. and then in the Import or Install a Component dialog box. On the Welcome page of the COM+ Application Install Wizard. your component will not appear in the list. 5. and then click Component. click Next. select the Details check box to see complete information about the components that are already registered. 6. click Import component(s) that are already registered. if possible. and select the application in which you want to install the component.Note Unconfigured COM components must have a type library. Open the application folder and select Components. Exporting application proxies that contain imported components will fail or cause a warning to be issued. COM+ will not provide marshaling information (type libraries or proxy/stubs) for some or all of the interfaces. and then click Component. Importing Components You can use the Component Services administrative tool to import into applications specific components that have already been registered on your computer as COM components in the Windows registry. Therefore. You can also remove a file from the Files to install list by selecting it and clicking Remove. 2. Click Finish. 7. point to New. During the export of an application proxy. 4. You can also rightclick the Components folder. Note When importing a component into a COM+ application. In the console tree of the Component Services administrative tool. and then click Finish to install the component. Importing a component does not install the interface or method information required to set interface properties or to configure access to the component from a remote client. Open the COM+ Applications folder for that computer. Removing a Component from a COM+ Application . and click Next. Select the component(s) you want to import from the displayed list. you should install rather than import unconfigured components. 3. On the Action menu.

2. To move a component from one COM+ application to another 1. In effect. In the details pane of the Component Services administrative tool. Click OK. To copy a component from one COM+ application to another 1. . 5. 4. click Delete. Select the component you want to remove. In the details pane of the Component Services administrative tool. moving a component removes the component from the original COM+ application and installs it in the target COM+ application. 2. Moving Components You can move a component from one COM+ application to another. This process requires detailed knowledge about the component's classes. Click Yes when prompted to confirm your action. You can also select the component. 2. In the Move component(s) dialog box. you can configure this component differently than the original component. In the Copy Component dialog box. in the Please select a Destination pane. right-click the component that you want to move and then click Move. On the Action menu. security configurations on interfaces and methods. and click Delete. Copying Components You can copy a component from one COM+ application to another. right-click the component that you want to copy and then click Copy.You can use the Component Services administrative tool to remove components from a COM+ application. select the application that contains the component you want to remove. right-click. 3. Open the application's Components folder. In the console tree of the Component Services administrative tool. 3. select the destination COM+ application to which you want the component to be moved. Note Exercise care when deleting and reinstalling individual components from a COM+ application. and other settings. To remove a component from a COM+ application 1. After you copy a component to another COM+ application. select the COM+ application to which the component will be copied. including their attributes.

4. On the Action menu. Or you can delete an installed server application or application proxy by using the Windows Installer command line syntax: msiexec -x application_name. If you selected a library application. Select the application you want to remove. you can delete it through the Add/Remove Programs utility in the Microsoft Windows Control Panel. if a server application or application proxy has been installed on a computer using Windows Installer (as described in "Installing COM+ Applications" in the Component Services Administration Guide). Open the COM+ Applications folder for the specified computer to display all the applications. select the computer for which you want to delete an application. Enter a new CLSID only if you want to change the one provided by COM+. 5. If you selected a server application. In addition. Enter the new ProgID for the copied component. Click OK. and then click Delete. . 3. and then clicking Shut down. 2. make sure that all processes currently using this library application are shut down. this will be sufficient to uniquely identify the copied component. you may need to remove them. or you can select the application. To delete a COM+ application 1. You can also delete an application by selecting it in the Component Services administrative tool and pressing the Delete key. Deleting a COM+ Application As existing applications become dated or are no longer being used. 6. shut down the application. 5. 4. In most cases. right-click. click Delete. You can shut down an application by selecting it in the Component Services administrative tool.msi These methods are especially useful for deleting COM+ applications on client machines that are not running the Component Services administrative tool. rightclicking. Enter the new CLSID for the copied component.3. You can also right-click the application name and then click Delete. COM+ displays an automatically generated CLSID. Click Yes when prompted to confirm your action. Note The ProgID for the original component is displayed for reference and cannot be changed. In the console tree of the Component Services administrative tool.

Deleting the application also deletes any components contained in the application. these resources must be removed through mechanisms other than the Component Services administrative tool. and so on). data or text files. IIS virtual root configuration. . If these components depend on additional resources (database connections.