Solved

How do I create a strong name key file?

Posted on 2008-10-16
6
758 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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: 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.

Question has a verified solution.

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

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…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 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