3.11 Global Assembly Cache (GAC)

 < Day Day Up > 



The GAC is a machine wide code cache that stores assemblies shared by applications running on that computer. Although, a useful feature, only use the GAC when you need to it is because you can easily end up with a string of dependencies that will lead to support problems. The best strategy is probably to keep the assemblies in the same directory structure as the application and only share assemblies in the GAC when you really need to. Keeping assemblies in an application directory does not prevent them from being accessible to unmanaged code or COM interoperability.

If you do need to use the GAC, the GAC tool is a part of the .NET Framework SDK that allows assemblies to be copied into it. Failing that, Windows Explorer can be used to simply drag-and-drop files across. Use of the Windows Explorer is only advisable when running in a development environment since it does not provide assembly reference counting or other management features.

The GAC resides in the WINNT directory, so it will inherit that directory's Access Control List. Therefore, access needs to be limited to trusted administrators only. Any assemblies placed into the GAC will need to be strongly named since they will undergo integrity checks to ensure that they have not been damaged or altered in any way.



 < Day Day Up > 



Microsoft  .NET. Jumpstart for Systems Administrators and Developers
Microsoft .NET: Jumpstart for Systems Administrators and Developers (Communications (Digital Press))
ISBN: 1555582850
EAN: 2147483647
Year: 2003
Pages: 136
Authors: Nigel Stanley

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