Floating FB popout byF5debug

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

 

Question 11 - What is a Strong Name?

A strong name is a .NET assembly name combined with its version number and other information to uniquely identify the assembly. This allows multiple versions of the same assembly to peacefully co-exist in the global assembly cache, where shared assemblies are typically stored. It consists of five parts as mentioned below

  • Simple Name – Usually the name of the file (without the extension) that contains the assembly
  • Public Key – RSA cryptographic public key that helps verify the assembly's authenticity
  • Version – Four-part version number, in the form of Major.Minor.Build.Revision
  • Culture – Target audience for the assembly, such as "neutral" (default audience), "en-us" (English – United States) or "fr" (France) etc.
  • Processor Architecture – Defines the assembly's format, such as MSIL (intermediate language) or x86 (binary for Intel x86 processors)


Question 12 - What are the steps to create Strong Name?

We have a set of steps that should be followed to create a strong name as shown below.

  • Open .net command prompt.
  • Go to the folder containing DLL.
  • Type sn -k test.snk, This will create  test .snk file in that folder.
  • Open the assemblyinfo.cs file of project.
  • Type file path  in this tag [assembly:AssemblyKeyFile@"E:\Code\practice\HP\bin\Debug\HP.snk")]
  • Build  application, finally your strong name created for your DLL.


Question 13 - What are the Problems faced using Strong Name?

  • Requires Exact Match. If you use strong names, your application or library must load the assembly with the exact strong name that you specify, including version and culture.
  • Cannot Lose Private Key. If your private key is lost or stolen, the security of your assembly is compromised. You will be forced to re-issue a new assembly signed with a new public-private key pair.


Question 14 - What is Program Database?

A program database files holds debugging and project state information that allows incremental linking of debug configuration of your program. A PDB file can be up to 2GB.


Question 15 - What is Delay Signing?

It is signing an assembly with its strong name public key, which is freely distributable, instead of using the private key as usual. This allows developers to use and test a strong-named assembly without access to the private key. Then at a later stage (typically just before shipping the assembly), a manager or trusted key holder must sign the assembly with the corresponding private key.



Question 16 - What is an Assembly?

Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations.


Question 17 - What are the Contents of an Assembly

  • Type metadata.
  • The assembly manifest, which contains assembly metadata.
  • Microsoft intermediate language (MSIL) code that implements the types.
  • A set of resources


Question 18 - What are the Types of an Assemblies?

Assemblies are of four types

  • Private - The assembly is intended only for one application
  • Shared - If the assembly is to be made into a Shared Assembly(GAC)
  • Static – These are the .NET PE files that you create at compile time. 
  • Dynamic - These are PE-formatted, in-memory assemblies that you dynamically create at runtime


Question 19 - What is a Satellite assembly?

  • A .NET Framework assembly containing resources specific to a given language.
  • Using satellite assemblies, you can place the resources for different languages in different assemblies.
  • The correct assembly is loaded into memory only if the user elects to view in that language.
  • Culture is maintained in a text file which acts like a resource to the assembly.


Question 20 - What are the Steps to Create Satellite Assembly?

Below are the steps to create a satellite assembly

  • Set the paths for resgen and al.exe:
  • Create a .resources file.
  • Create the satellite assembly.
  • The assembly should have the naming convention for .NET to be able to search for it. 
  • Specify the settings for culture.
  • Put the satellite assembly in the appropriate folder.
  • Once the satellite assembly is created, physically copy it to the appropriate directory. 
  • Repeat the process for each language in which you are creating an assembly.

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

Comments (1) -

nmnjkknkn knkn
nmnjkknkn knkn
10/10/2012 6:58:28 AM #

nmm

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