Solved

How do I create a strong name key file?

Posted on 2008-10-16
6
757 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

840 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