HOWTO: Create an Empty MTS Package to Add Components for ASP

ID: Q223406


The information in this article applies to:
  • Microsoft Transaction Server 2.0
  • Microsoft Internet Information Server versions 4.0, 5.0
  • Microsoft Windows NT 4.0


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).


MORE INFORMATION

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.


  2. Open the Packages Installed folder for that computer.


  3. 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.


  4. 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.


  5. Click the Create an empty package button.


  6. Type a name for the new package, and click Next.


  7. 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.


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


  3. Open the Components folder.


  4. 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.


  5. Click the Install new component(s) button.


  6. 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.


  7. 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.


  8. 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.


  9. 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.


Additional query words:

Keywords : kbASP kbCOMt kbMTS kbGrpASP kbiis400 kbiis500
Version : winnt:2.0,4.0,5.0
Platform : winnt
Issue type : kbhowto


Last Reviewed: January 13, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.