Assembly:-  The word Assembly means it is A group of some parts that fit together to form a self-contained unit.



  • So in asp.net, An assembly is a collection of single or multiple files.
  • Assembly physically exist as DLLs or EXEs
  • The constituent files can be any file types like image files, text files etc. along with DLLs or EXEs
  • The assembly also contains metadata that is known as assembly manifest.
  • The assembly manifest contains data about the versioning requirements of the assembly, like author name of the assembly, the security requirements to run and the various files that form part of the assembly.
  • When you compile your source code by default the exe/dll generated is actually an assembly.
  • More accurately, an assembly is the primary unit of deployment, security, and version control in the .NET Framework. 
Advantages of Assemblies:-

  1. ASP.Net assemblies has a lot of good advantages when compare to conventional DLLs that the developers use to develop earlier. In the case of DLLs if a DLL has to be shared with some other application, it has to be registered in that particular machine. But, In the case of Asp.net assemblies there is no such type of registration required. Here we just need to do is to copy the assembly and put in the bin directory of the application that is going to use it.
  2. If we need to share a particular assembly with any other applications., we can do so by placing the assembly in the Global Assembly Cache (GAC). But before we going to do it we need to give a strong name to that assembly.Strong name is similar to GUID(It is supposed to be unique in space and time) in COM, components.Strong Name is only needed when we need to deploy assembly in Global Assembly Cache (GAC).Strong Names helps GAC to differentiate between two versions.Strong names use public key cryptography (PKC) to ensure that no one can spoof it.PKC use public key and private key concept.
  3. Another advantage of using ASP.Net assemblies is the ability to read the contents of an assembly. Each assembly has a manifest that has details about the assembly itself.
  4. The System.Reflection namespace has classes like Assembly which can be used to get the details of the assembly and with that it is also possible to load an assembly dynamically at runtime.

Share it

1 comments:

Post a Comment