Deployment


Assemblies with serviced components must be configured with COM+. This configuration can be done automatically or by registering the assembly manually.

Automatic Deployment

If a .NET client application that uses the serviced component is started, the COM+ application is configured automatically. This is true for all classes that derive from the class ServicedComponent. Application and class attributes such as [EventTrackingEnabled] define the characteristics of the configuration.

Automatic deployment has an important drawback. For automatic deployment to work, the client application needs administrative rights. If the client application that invokes the serviced component isASP.NET, the ASP.NET runtime usually doesn't have administrative rights. With this drawback, automatic deployment is useful only during development time. However, during development automatic deployment is an extremely advantageous feature because it is not necessary to do manual deployment after every build.

Manual Deployment

You can deploy the assembly manually with the command-line utility .NET Services Installation Tool regsvcs.exe. Starting the command

 regsvcs SimpleServer.dll 

registers the assembly SimpleServer as a COM+ application and configures the included components according to their attributes, and also creates a type library that can be used by COM clients accessing the .NET component.

After you've configured the assembly, you can start the Component Services explorer by selecting Administrative Tools Component Services from the Windows menu. In the left tree view of this application, you can select Component Services Computers My Computer COM+ Applications to verify that the application was configured.

Creating an Installer Package

With the Component Services explorer, you can create Windows installer packages for server or client systems. An installer package for the server includes the assemblies and configuration settings to install the application on a different server. If the serviced component is invoked from applications running on different systems, a proxy must be installed on the client system. The installer package for the client includes assemblies and configuration for proxies.

To create an installer package, you can start the Component Services explorer, select the COM+ application, select the menu Action Export, and click the Next button with the first dialog. Then the dialog shown in Figure 30-3 is opened. With this dialog you can export either a Server application or an Application proxy. With the option Server application you can also configure to export user identities with roles. This option should only be selected if the target system is in the same domain as the system where the package is created, as the configured user identities are put into the installer package. With the option Application proxy, an installer package for the client system is created.

image from book
Figure 30-3



Professional C# 2005
Pro Visual C++ 2005 for C# Developers
ISBN: 1590596080
EAN: 2147483647
Year: 2005
Pages: 351
Authors: Dean C. Wills

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