Deploying a Serviced Component

Team-Fly    

Developing XML Web Services and Server Components with Visual C#™ .NET and the .NET Framework, Exam Cram™ 2 (Exam 70-320)
By Amit Kalani, Priti Kalani

Table of Contents
Chapter 11.  Deployment


The two main steps to deploy a serviced component are as follows:

  1. Register the serviced component with the COM+ catalog Registration can take place in three different ways:

    • Lazy registration The .NET Framework automatically registers a serviced component with the COM+ catalog when the component is requested for the first time. The registration of a component requires administrative privileges, and the component registration will fail if that application's first user does not have administrative privileges. This option can be used while developing or testing a component but is not a good idea for deployment.

    • Manual registration You can use the Component Services administrative tool (regsvcs.exe) to manually register a serviced component with the COM+ catalog. This technique of registration is useful in combination with the XCOPY deployment of the serviced component.

    • Programmatic registration You can use the RegistrationHelper class to programmatically register a serviced component with the COM+ catalog. You use this registration technique when creating a Windows Installer based setup package for the deployment of a serviced component.

  2. Install the serviced component assembly where the CLR can locate it Where the CLR locatesan assembly also depends on the program that makes the request to an assembly. Therefore, the installation location might depend on how the component is registered with the COM+ catalog. There are two ways to register a serviced component in the COM+ catalog:

    • Library application The serviced component, which is installed as a library application, is created in the process of the calling application. In this case, the serviced component can be deployed as a private application within the calling application directory structure. But if the serviced component is used by multiple calling applications, rather than introduce redundancy by copying the serviced component in the directory of each calling application, it is a better idea to install the serviced component in the GAC.

    • Server application The serviced component, which is installed as a server application, is created in the process of dllhost.exe, which is located in the Windows System directory. Obviously, a better installation choice in this case is the GAC.

From the preceding list, it is clear that, in most cases, you would install a serviced component assembly in the GAC. You also would either use the Component Services administrative tool for registration of a serviced component in the COM+ catalog, or use the RegistrationHelper class when programmatically registering a serviced component for example, when registering through a setup program.

You can install a serviced component by using a Visual Studio .NET setup and deployment project or by using the Component Services administrative tool.


    Team-Fly    
    Top


    MCAD Developing XML Web Services and Server Components with Visual C#. NET and the. NET Framework Exam Cram 2 (Exam Cram 70-320)
    Managing Globally with Information Technology
    ISBN: 789728974
    EAN: 2147483647
    Year: 2002
    Pages: 179

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net