Solved

How do I create a strong name key file?

Posted on 2008-10-16
6
753 Views
Last Modified: 2013-11-05
Hello all.  I am utilizing in one of my applications a DLL.  In the setup instructions it is saying if I need to consume the components I must specify a value for the AssemblyKeyFile attribute in the AssemblyInfo file indicating the path to the file containing the key pair used to generate the strong name such as a KeyPair.dat file.  It has been a long time since I had to create a AssemblyKeyFile.  How do I do that?  I know there is a sn.exe in the SDK for VS 2005 but I am not sure what the key pair is and how to create it.  Thanks for any help.
0
Comment
Question by:sbornstein2
  • 4
  • 2
6 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 22730598
Step 4: Create a Strong Name Key File
http://msdn.microsoft.com/en-us/library/aa559684.aspx
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 22730599
SN.EXE - Code Strong Programs with Strong Names
http://visualbasic.about.com/od/usingvbnet/a/FWTools5.htm
0
 

Author Comment

by:sbornstein2
ID: 22730935
Hi Dhaest, thanks for your help.  So I did the first link and went into the Visual Studio 2005 Command Prompt.  I went to the directory where I wanted to create the key and typed in sn -k keypair.dat and it said Access Denied.  Also just so I understand when the documentation I am reading says if I want to use the Core Security components for declarative security and I plan to consume them I must specify a value for the AssemblyKeyFile, do I have to like point to a DLL or something or is this just creating the strong name key and then I reference it in the AssemblyInfo file if that makes sense?  Do I have to register this in the GAC etc?  Thanks for all your help
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:sbornstein2
ID: 22731086
I do see a keypair.dat file in a directory so I am wondering if I need to create a strong name for that or something.
0
 

Author Comment

by:sbornstein2
ID: 22731180
ok so I see there is this dat file key.  I assume I have to place that in the directory and then create a AssemblyInfo.cs and then just add the AssemblyKeyFile line, does that sound correct?
0
 

Author Closing Comment

by:sbornstein2
ID: 31506704
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now