What you want to see on DotNetFunda.com ?
Go to DotNetFunda.com
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 52117 |  Welcome, Guest!   Register  Login
Home > Articles > ASP.NET > Metadata Vs Manifest

Metadata Vs Manifest

Article posted by Deysomnath on 1/28/2008 | Views: 23083 | Category: ASP.NET | Level: Intermediate red flag


This article will describe the diffrence between metadata and manifest.

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.

Page copy protected against web site content infringement by Copyscape
Found interesting? Add this to:



Please Sign In to vote for this post.

About Somnath Dey

Experience:5 year(s)
Home page:http://somnathdey.blogspot.com/
Member since:Tuesday, April 29, 2008
Level:Starter
Status: [Member]
Biography:As soon as the fear approaches near, attack and destroy it.
>> Write Response - Respond to this post and get points
Related Posts

In this article I will explain how to import gmail contacts of a user by using GContacts Data API provided by Google. This Article will help the developers, who are willing to develop SOCIAL NETWORK applications like facebok, orkut, hi5, twitter e.t.c.In Social Network Applications –their objective is to promote their website world wide to n-no of users, for that they targets gmail,yahoomail,AOL,hotmail e.t.c.where you need to invite more people. By keeping that motive in mind I prepared this article with help of Google Contacts API and their suggested source code, I customized according to my Requirement. Its Just like kids play. There is no need to think more and more with Hazards of knowledge.I will explain this article with Step by Step.

In this article I am going to show how to start with creating an asp.net website using Visual Web Developer 2008.

A tutorial video which explains step by step to enable your asp.net application to consume application services like Membership,Roles,Profiles etc.

In this article I provided some trick for not allowing user to aceess your site when javascript is disabled in browser.

In this article rtpHarry examines the CompareValidator and some of the usage scenarios that aren't immediately obvious when you start using it.

More ...
About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/23/2013 1:14:25 PM