Floating FB popout byF5debug

Interview Questions and Answers on .Net Framework, OOPS, ASP.Net, C#.Net, SQL Server, WCF Series – Part 3

 Question 21 - What is an Assembly Loader?

  • Checks if the assembly is Strongly signed.
  • If yes it will search in the GAC
  • Loader will search the policy file name in the format of
  • Policy.AssemblyMajorVersion.AssemblyMinorVersion.AssemblyName
  • Eg. MyPolicy.1.2.Assembly1
  • If such a file exists it will look inside of it if the version of the assembly that we are trying to load matches the version/versions range written in the policy file. If it does, it will try to load the assembly with the version specified there. If no such policy file exists, it will try to load assembly from the GAC.
  • If it will fail to find it in the GAC, it will start to search in the system’s search path.
    In web applications it will also include the application’s Bin directory in the search path.


Question 22 - What is Multi Module Assembly or Assembly Linker?

We like to combine Hello.dll with GoodBye.dll and put them into a Private Assembly we call GreetAssembly.dll.

DotNet> al /t:library /out:bin\Hellowroldassembly.dll bin\GoodDay.dll bin\GoodMorning.dll

For this purpose we use the Assembly Linker. As /t (target) we generate here a library referencing the two other DLLs. This is also called a Multi-Module Assembly. Again, we store all the binaries in a bin folder.



Question 23 -
What is an Assembly Manifest?

The assembly manifest contains this assembly metadata. An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and 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 standalone PE file that contains only assembly manifest information.

 

Question 24 - What is a Metadata?

Metadata is data that describes the state of the assembly and a detailed description of each type, attribute within the assembly. Metadata stores the following information:

  • Description of the assembly.
        • Identity (name, version, culture, public key).
        • The types that are exported.
        • Other assemblies that this assembly depends on.
        • Security permissions needed to run.
  • Description of types.
        • Name, visibility, base class, and interfaces implemented.
        • Members (methods, fields, properties, events, nested types).
  • Attributes.
        • Additional descriptive elements that modify types and members.



Question 25 - What is a Base class in .Net?

Base class is the one from which the object and references are being inherited in .net

  • System.object is for .Net
  • System.Web.UI is for asp.net

 

 

Question 26 - What is Full Assembly Reference?

A full assembly reference includes the assembly's text name, version, culture, and public key token (if the assembly has a strong name). A full assembly reference is required if you reference any assembly that is part of the common language runtime or any assembly located in the global assembly cache.


Question 27 - What is Partial Assembly Reference?

We can dynamically reference an assembly by providing only partial information, such as specifying only the assembly name. When you specify a partial assembly reference, the runtime looks for the assembly only in the application directory.


Question 28 - What is an Assembly Qualified Name?

An assembly qualified name isn't the filename of the assembly; it's the internal name of the assembly combined with the assembly version, culture, and public key, thus making it unique.


Question 29 - What is ILDASM (Intermediate Language Disassembler)?

It is a tool provided in C# to view and read the assembly content in manifest view. This tool is supplied along with the Visual Studio .NET you are using. It is also available along with .NET SDK. To access this tool, you have to run the ildasm.exe


Question 30 -
What is Global Assembly Cache?

  • The GAC stores assemblies specifically designated to be shared by several applications on the computer.
  • Assemblies deployed in the GAC must have a strong name.
  • When an assembly is added to the GAC, integrity checks are performed on all files that make up the assembly. The cache performs these integrity checks to ensure that an assembly has not been tampered with, for example, when a file has changed but the manifest does not reflect the change.
  • Use a developer tool called the Global Assembly Cache tool (Gacutil.exe), provided by the .NET Framework SDK or Use Windows Explorer to drag assemblies into the cache.

Disclaimer – F5debug Interview Questions & Answers Series:

You may recopy extracts from these pages ("the material") to individual third parties website or to the local system internal websites for their personal information, but only if:

    You acknowledge the www.f5debug.net as the source of the material. Such acknowledgment should include reference to the www.f5debug.net in the copy of the material and should also include the words " © Karthikeyan Anbarasan, www.f5debug.net ". You inform the third party that these conditions apply to him/her and that he/she must comply with them.

About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter