Microsoft KB Archive/223406

= How To Create an Empty MTS Package to Add Components for ASP =

Article ID: 223406

Article Last Modified on 7/16/2004

-

APPLIES TO


 * Microsoft Transaction Services 2.0
 * Microsoft Internet Information Server 4.0
 * Microsoft Internet Information Services 5.0

-



This article was previously published under Q223406



SUMMARY
This article explains how to create an empty Microsoft Transaction Server (MTS) package and how to add COM components to that package to use with Active Server Pages (ASP).



Creating an Empty MTS Package
The first step in using the MTS Explorer is to create a package. A package is a collection of components that run in the same process. You can either create an empty package and then add components, or install a pre-built package. Add packages by using the Package wizard or by dragging a package file (.pak) from the Windows NT Explorer and dropping it into the right pane of the MTS Explorer.

Packages define the boundaries for a server process running on a server computer. For example, if you group a sales component and a purchasing component in two different packages, these two components will run in separate processes with process isolation. Therefore, if one of the server processes terminates unexpectedly (such as an application fatal error), the other package can continue to execute in its separate process.

Use the following steps to create an empty package:
 * 1) In the left pane of MTS Explorer, select the computer for which you want to create a package.


 * 1) Open the Packages Installed folder for that computer.


 * 1) On the Action menu, click New. You can also select the Package Installed folder and either right-click and select New and then Package from the shortcut menu, or select the Create a new object button on the MTS toolbar.


 * 1) Use the Package wizard to either install a pre-built package or create an empty package. If you create an empty package, you must add components and roles before it will be functional.


 * 1) Click the Create an empty package button.


 * 1) Type a name for the new package, and click Next.


 * 1) Specify the package identity in the Set Package Identity dialog box, and then click the Finish button.

The default selection for package identity is Interactive User. The interactive user is the user that logged on to the server computer on which the package is running. You can select a different user by selecting the This user option and entering a specific Windows NT user or group.

Adding a Component to an MTS Package
An MTS component is a reusable piece of code and data that is built to the Component Object Model (COM) specification. Components enact business logic in an application.

You can add a component to a package with one of the following methods:


 * Using the component wizard


 * Moving a component from an existing package

To add components to the Components folder of a package, you can either use the Component wizard in MTS Explorer, or drag dynamic-link libraries (DLLs) that contain the components you want from Windows NT Explorer and drop them in the package. If you use the Component wizard, you can either install a new component, which adds the component to the system registry, or import components that have already been registered. Components can be added to empty packages or existing packages.

To move a component from an existing package, simply drag and drop the component from the existing package to the new component.

Note that a single MTS application can contain components that can be installed in multiple packages. You can place different components that are housed in the same DLL into completely separate packages.

Use the following steps to add a component to a package:
 * 1) In the left pane of MTS Explorer, select the computer on which you want to install the component.


 * 1) Open the Packages Installed folder, and select the package in which you want to install the component.


 * 1) Open the Components folder.


 * 1) On the Action menu, click New. You can also select the Components folder, right-click, and select New and then Component from the shortcut menu, or select the Create a new object button on the MTS toolbar.


 * 1) Click the Install new component(s) button.


 * 1) In the dialog box that appears, click Add Files to select the files you want to install. You should select the DLL that contains the component you want to install. If the component has an external type library or proxy/stub DLL, add those files also. Make sure that in your Windows NT Explorer, the also Hidden files option is set to Show all files. If this option is set to hide files with the .dll file name extension, you will not see the DLLs that contain your component in the Component wizard Add Files dialog box. You will have to restart the MTS Explorer if you change this setting.
 * 2) In the dialog box that appears, select the file or files you want to add, and click Open. You can display all available files, just DLLs, or just type libraries by clicking the appropriate option in the Files of type box.
 * 3) After you add the files, the Install Components dialog box displays the files you have added and their associated components. If you select the Details check box, you will see more information about file contents and the components that were found. Microsoft Transaction Server components must have a type library. If MTS cannot find your component's type library, your component will not appear in the list. You can also remove a file from the Files to install list by selecting it and clicking Remove Files.
 * 4) Click the Finish button to install the component. It is important to note that installing a component allows you to view the interfaces and methods on that component. When you import a component, the imported component's interfaces and methods are not visible in MTS Explorer.

Keywords: kbhowto kbsysadmin KB223406

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.