Global Deployment
In the preceding section, we stated that most applications are deployed by copying files to the proper directory. The exception occurs when you wish to use the same assembly in more than one application. In this case, you use global deployment.
There are many scenarios in which you might want to have a common assembly file accessible to multiple applications. A firm might have two different websites on a server, both providing access to the same database. One website is free of charge and open to the public, but is of limited functionality; the other is fully functional, requiring a paid subscription. Because both sites access the same database, they will have common database query routines. They may also have common login routines. Using the same assembly to contain those common routines will enhance maintainability. Another scenario might be a web-hosting firm that has many websites running on a server. It may want to offer some functionality to all of its client websites. Encapsulating this functionality in a globally available assembly would make this easy to offer and maintain.
Another consideration is versioning. When assemblies are local to an application, each application can have its own version of common assemblies. The .NET Framework allows for global assemblies to have multiple versions. Each application making use of the global assembly can either specify the version it wants to use or take the latest version. By specifying the version, an application ...
Get Programming ASP.NET 3.5, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.