What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 4575 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > .NET Framework Interview Questions > How to create Key Pair? ... ...

How to create Key Pair?

Interview question and answer by: Abhisek | Posted on: 1/21/2010 | Category: .NET Framework Interview questions | Views: 1906 |


Answer:

You can create a key pair using the Strong Name tool (Sn.exe). Key pair files usually have an .snk extension. To create a key pair at the command prompt, type the following command:
sn k

In this command, file name is the name of the output file containing the key pair. The following example creates a key pair called myKey.snk.
sn -k myKey.snk

Asked In: Many Interviews | Alert Moderator 
Found interesting? Add this to:


 Responses

Posted by: Ch.purnima@gmail.com | Posted on: 04 Feb 2010 06:33:30 AM | Alert Moderator 

I dont no what the word "Keypair" sounds ? if it really related to strong name then my answer is:

1. Strong name is similar to GUID (It is supposed to be unique in space and time) in COM Components
2. Strong name is only needed when we need to deploy assembly in GAC.
3. Strong name helps GAC to differentiate between two versions of an assembly
4. Strong names use public key cryptography (PKC) to ensure that no one can spoof it. PKC uses public key and private key concept
5. Steps to generate a strong name and sign an assembly:
a. Go to “visual studio command prompt”
b. Type sn.exe –k “C:\test.snk”
c. Signing the project with this snk file
i. In visual studio, click on project -> classlibrary1.properties
ii. Select signing
iii. Click on “use a key file” and browse the snk file to the respective folder
iv. Compile the project

Note: You can view .snk file with note pad


>> Write Response - Respond to this post and get points

Even more ... | Submit Interview Questions and win prizes!

More Interview Questions from Abhisek

Even more ... | Submit Interview Questions and win prizes!


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/22/2013 10:11:14 AM