Go to DotNetFunda.com
 Online : 872 |  Welcome, Guest!   Login
 
Home > Articles > ASP.NET > Metadata Vs Manifest

  • Download the OOPS, ASP.NET and ADO.NET Training Videos for FREE, click here.

Submit Article | Articles Home | Search Articles |

Metadata Vs Manifest

 Posted on: 1/28/2008 6:16:02 AM by Deysomnath | Views: 5645 | Category: ASP.NET | Level: Intermediate | Print Article
This article will describe the diffrence between metadata and manifest.

.NET Training Videos!
Buy online comprehensive training video pack just for $35.00 only, see what's inside it.

Metadata:

Metadata is the complete way of describing what is in a .NET assembly. Digging into the metadata yields the types available in that assembly, viz. classes, interfaces, enums, structs, etc., and their containing namespaces, the name of each type, its visibility/scope, its base class, the interfaces it implemented, its methods and their scope, and each method’s parameters, type’s properties, and so on. The assembly metada is generated by the high-level compilers automatically from the source files. The compiler embeds the metadata in the target output file, a dll, an .exe or a .netmodule in the case of multi-module assembly. In the case of a multimodule assembly ever module that contains IL must have the metadata embeded in it to describe the types in that module. Every compiler targeted for the .NET CLR is required to generate and embed the metadata in the output file, and that metadata must be in a standard format. .NET Reflection extensively uses the metadata information to know the type information dynamically.


Assembly Manifest:

Metadata describes the contents in an assembly, whereas the manifest describes the assembly itself, providing the logical attributes shared by all the modules and all components in the assembly. The manifest contains the assembly name, version number, locale and an optional strong name that uniquely identifying the assembly. This manifest information is used by the CLR. The manifest also contains the security demands to verify this assembly. It also contains the names and hashes of all the files that make up the assembly. The .NET assembly manifest contains a cryptographic hash of different modules in the assembly. And when the assembly is loaded, the CLR recalculates the hash of the modules at hand, and compares it with the embeded hash. If the hash generated at runtime is different from that found in the manifest, .NET refuses to load the assembly and throws an exception. This is different from COM, under COM it is possible to swap an original DLL or EXE file with another, which have same Type Libraries/Interfaces and cause damage to the system, by running malacious code. The manifest is also generated automatically by the high-level compiler from the source files of all modules in the assembly. Manifest is embeded to only one physical file and only once since it is common for all the modules in an assembly, whereas the metadata needs to be embeded all the modules. The .NET CLR compatible compilers must generate the manifest and it should be in the standard format. Using the manifest .NET captures information about other referenced assemblies. This ensures version compatibility, and the assembly gets to interact with the exact trusted set of other assemblies it expects. The manifest contains every referenced assembly name, its public key (if a strong name is available), its version number, and locale. While running this assembly, .NET guarantees that only these specific assemblies are used, and that only compatible versions are loaded.
If you like this article, subscribe to our RSS Feed. You can also subscribe via email to our Interview Questions, Codes and Forums section.

Interesting?   Share and Bookmark this kick it on DotNetKicks.com


About Somnath Dey

Experience:0 year(s)
Home page:http://somnathdey.blogspot.com/
Member since:Tuesday, April 29, 2008
Level:NotApplicable
Status: [Member]
Biography:As soon as the fear approaches near, attack and destroy it.
 Latest post(s) from Deysomnath

   ◘ Detailed Steps to create Application Pool posted on 4/13/2009 7:18:57 PM
   ◘ A Guide to SQL Server Indexes posted on 11/4/2008 3:27:19 AM
   ◘ Best Practices to Improve ASP.Net Web Application Performance. posted on 1/31/2008 2:12:35 AM
   ◘ Delete Duplicate rows from the table. posted on 1/28/2008 6:44:41 AM
   ◘ Metadata Vs Manifest posted on 1/28/2008 6:16:02 AM


Submit Article

About Us | The Team | Advertise | Contact Us | Feedback | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found copied contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
All rights reserved to DotNetFunda.Com. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks.
(Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher)