Deploying Application Blocks
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
When you deploy the Composite Web Application Block, you must copy multiple assemblies to the target Web server. The following assemblies are required for any application the uses the Composite Web Application Block:
When you use the guidance package to create a composite Web application, the generated solution uses the Enterprise Library for authorization, logging, and exception handling. You must also deploy the following assemblies when you deploy an application that you generate with the guidance package:
Applications that use the Composite Web Application Block can be deployed in one of two configurations:
- They can be deployed as private assemblies in the Web site bin folder.
- They can be deployed as shared assemblies in any file system location or in the Global Assembly Cache.
Deploying the Composite Web Application Block as Private Assemblies
If the application does not have to use the services available from the Global Assembly Cache, the Composite Web Application Block can be deployed in the Web site bin folder. This simplifies deployment because you can install the whole application, including the Composite Web Application Block assemblies, on the destination computer by using the XCopy command. If multiple applications on the same computer use the Composite Web Application Block, you can install a copy of the assemblies in each application's bin folder. This allows each application's copy of the assemblies to be independently updated.
Note: The projects in the reference implementation include post-build actions that copy required assemblies to the Web site bin folder. These actions provide deployment to the Web site when you build the solution in Visual Studio.
Deploying the Composite Web Application Block as Shared Assemblies
You can assign a strong name to the Composite Web Application Block assemblies. Both Visual Studio .NET and the .NET Framework SDK include tools to do this. After assemblies are strong named, they can be deployed in a shared location and used by multiple applications. You can choose to deploy the assemblies in any file system location and add a <codeBase> element that specifies the location of the assemblies in the application configuration file of each application that uses the Composite Web Application Block.
A more likely scenario is that you deploy shared assemblies in the Global Assembly Cache. In this scenario, all applications on the computer can use the assemblies without any additional configuration. You can use one of the following tools to install an assembly in the Global Assembly Cache:
- An installer program, such as the Microsoft Windows Installer
- The Global Assembly Cache Tool command line utility (Gacutil.exe)