Dot net FAQ's on Manifest and Assemblies

What is Manifest?

Assembly metadata is stored in Manifest. Manifest contains all the metadata needed to do the
following things :

√ Version of assembly

√ Security identity

√ Scope of the assembly

√ Resolve references to resources and classes.

√ The assembly manifest can be stored in either a PE file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a stand-alone PE file that contains only assembly manifest information.

Where is version information stored of an assembly ?

Version information is stored in assembly in manifest.

(I)Is versioning applicable to private assemblies?

Versioning concept is only applicable to global assembly cache (GAC) as private assembly lie in
their individual folders.

What is GAC ?

Twist :- What are situations when you register .NET assembly in GAC ?

GAC (Global Assembly Cache) is used where shared .NET assembly reside. GAC is used in the
following situations :-

√ If the application has to be shared among several application.

√ If the assembly has some special security requirements like only administrators can remove the assembly. If the assembly is private then a simple delete of assembly the assembly file will remove the assembly.

Note :- Registering .NET assembly in GAC can lead to the old problem of DLL hell, where COM version was stored in central registry. So GAC should be used when absolutely necessary.

What is the concept of strong names ?

Twist :- How do we generate strong names ?

Twist :- What is use the of SN.EXE ?

Twist :- How do we apply strong names to assembly?

Twist :- How do you sign an 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 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.



No comments:

Post a Comment