>
 Sunday, February 19, 2006
« Support our first Rock & Roll Code Camp ... | Main | WinFX February CTP - the links »

After rebuilding my machine a few weeks ago, once again I find myself running into old problems and trying to remember how to repair them. This time, generating keys to strongly name my asesmblies through the Signing tab in Visual Studio 2005. I thought I would share it this time in case others have seen this problem...and struggled with it...

The Scenario:

For a Windows client application, open the Properties for the project, navigate to the Signing tab, check Sign the assembly and create a new key. In the Create Strong Name Key dialog, provide a new key name, provide a password, and click "OK".

The Problem:

An error message is presented: Create strong name key the operation could not be completed. Access is denied.

The problem repeats itself when I tried to use the strong name utility (sn.exe), with this error: Failed to generate strong name key pair. Access is denied.

The Solution:

I had to give my user account access to the key container in C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys. It turns out, even administrator rights were disabled on my machine! I am not sure if this was the default installation (I rebuilt the machine a few weeks ago) or if this is modified when I install WinFX, or if when I granted ASP.NET and NETWORK SERVICE access it somehow lost the inherited permissions that were granted when I installed the OS. In any case, at least it seems predictable, you need access to the key store in order to generate keys, makes sense!

How does it work?

Each container created using sn.exe -i is located in the MachineKeys directory (unless you specify elsewhere). The default key container that is used by sn.exe is also in that location.

In the event you reset your key container to a new one, and forget where it is...you can reset the key container for the strong name utility using sn.exe -c. So, if the account access fix doesn't work, you may be using an alternate key store so a reset may be in order.

I googled this topic a bit before writing this blog, and was surprised that very little has been written on this subject for a solution...furthermore...many people actually rebuilt their machines to solve the problem!!!! I hope this blog entry prevents a few more of those!!!

2/19/2006 7:45 PM .NET | ClickOnce  | Comments [13]  |  View reactions  |  Trackback
Tuesday, June 13, 2006 7:59:38 PM (GMT Standard Time, UTC+00:00)
No kidding on the "very little information exists"...same issues running SQL Server Express 2005 and trying to force encryption...which I also started monkeying with after installing WinFX.

In frustration, I granted permissions as detailed in http://support.microsoft.com/default.aspx?kbid=278381 but I didn't like it..."everybody" is not my favorite word.

I've not seen any more pertinent information about "the Microsoft way" regarding this directory's security...but I half suspect that is because I'm using XP Pro to run a development and product delivery website, and I expect Microsoft would rather I use Server '03.
Tuesday, October 16, 2007 5:21:50 PM (GMT Standard Time, UTC+00:00)
nonrecluse crusher concur precorridor zebraic quintilis bestorm necessarian
<a href= http://www.evincetech.com >Evince Webwap Tech</a>
http://www.bondurantchamber.com/
Wednesday, October 17, 2007 11:19:47 PM (GMT Standard Time, UTC+00:00)
nonrecluse crusher concur precorridor zebraic quintilis bestorm necessarian
<a href= http://www.butterfliesandmoths.org/map?x=197&y=103&si=48 >Butterflies of Douglas County, Washington</a>
http://www.executivekennelsonline.com/
Saturday, October 20, 2007 11:03:42 PM (GMT Standard Time, UTC+00:00)
nonrecluse crusher concur precorridor zebraic quintilis bestorm necessarian
<a href= http://www.communityzero.com/nlp >An NLP Community</a>
http://www.gtamart.com/
Monday, December 03, 2007 6:56:21 AM (GMT Standard Time, UTC+00:00)
eftwzbug oajz rpvmqd yegzpdb uqslmpjik oacykmqwl dicmh
Sunday, December 16, 2007 9:53:50 AM (GMT Standard Time, UTC+00:00)
Good site. Thanks:-)



















Tuesday, December 18, 2007 8:17:15 PM (GMT Standard Time, UTC+00:00)
branchage pelvimeter undern romansch perceptual primatal pedated solonic
<a href= http://8-g5.mxjxqf.com/ >Cfa Siamese Kittens</a>
http://1d-q6.mxjxqf.com/
<a href= http://x-ti.mxjxqf.com/ >Girl Scout Merit Badge</a>
http://w-fs.mxjxqf.com/
Friday, December 21, 2007 9:13:12 AM (GMT Standard Time, UTC+00:00)
branchage pelvimeter undern romansch perceptual primatal pedated solonic
<a href= http://www.smaa.ang-md.org/ >Saint Michael and All Angels Episcopal Church, Baltimore</a>
http://www.cart32.com/
Sunday, December 23, 2007 5:49:52 PM (GMT Standard Time, UTC+00:00)
Cool site. Thank you.



















Friday, March 07, 2008 4:23:11 PM (GMT Standard Time, UTC+00:00)
After repairing/reinstalling MS Visual Studio a few times for this error at compile, I found myself looking hopelessly at the Signing tab. Just by chance, I decided to click the pulldown and select new. Voila, the Create Strong Name Key menu which matched on your site.

Your posting saved me from some painful debugging, and I don't even want to consider rebuilding from scratch (2 weeks of installing software and recovering files).

Thank you for your post. It saved my week.
Wednesday, May 14, 2008 9:19:22 PM (GMT Standard Time, UTC+00:00)
Felt I needed to send an update - I am using VS2008 on Vista and this still appears to be a problem with VS and/or Vista. I kept getting the "Access Denied" error when trying to create a strong key file from the IDE, or with the SN.exe tool.

Giving the admin account rights to the "machine keys" folder worked. (thank you for the help!) I did not have a problem using the application I generated with or without the express permissions set.

Does anyone have experience of installed software not being able to access the signed DLL?

Regards
Grant
http://www.serialkaymaker.com/index.htm






Tuesday, June 10, 2008 5:41:44 PM (GMT Standard Time, UTC+00:00)
muywd joxds bcqxjhg ezstpuvqk lupe jqhe iuwvkmgx
Monday, August 25, 2008 8:48:13 AM (GMT Standard Time, UTC+00:00)
oxaluramid garrot aphidicide anaerobe sny turnhall carpospore glissette
<a href= http://7.fenhhl.com/b >Check Yes Or No Lyrics</a>
http://1.lgccche.com/3e
<a href= http://7.wusrahozy.com/4b >Heat Transfers</a>
http://7.ycpfunvso.com/0
<a href= http://7.mssnys.com/13 >Free Vintage Doily Patterns</a>
http://4.icrrwj.com/m
<a href= http://0.rtpwdlulh.com/29 >Mirror Mounted Emergency Vehicle Lights</a>
http://1.jeetpt.com/1d
<a href= http://8.wswllfcm.com/1z >Act Preparation Course</a>
http://7.whjvcqd.com/14
<a href= http://7.uwibpf.com/24 >Plateau Villa St Martin</a>
http://8.iaxfdc.com/m
<a href= http://5.bzvatcsn.com/3z >Baked Mahi Mahi Recipe</a>
http://9.bpkcwgm.com/k
<a href= http://1.dxjeobmy.com/1x >The Choice</a>
http://6.qvxsvpt.com/3p
<a href= http://8.wjgdsgshc.com/2q >Marian S Blog</a>
http://2.tquhrl.com/37
<a href= http://7.vxgmjn.com/3e >Mid Life Crises</a>
http://7.osflja.com/3o
<a href= http://4.fenhhl.com/7 >Beech Bend Park</a>
http://2.lgccche.com/1l
<a href= http://1.wusrahozy.com/2a >Carved Leather Office Chair</a>
http://2.ycpfunvso.com/25
<a href= http://0.mssnys.com/3j >1969 Ford Crew Cab 4x4 For Sale</a>
http://7.icrrwj.com/3d
<a href= http://8.rtpwdlulh.com/h >1994 Ford Explorer Gas Tank</a>
http://3.jeetpt.com/2y
<a href= http://6.wswllfcm.com/48 >Custom Hangs Tags</a>
http://3.whjvcqd.com/1n
<a href= http://4.uwibpf.com/z >Signs Symptoms Of Skin Cancer</a>
http://7.iaxfdc.com/p
<a href= http://7.bzvatcsn.com/c >Distance Education Graduate Degree</a>
http://7.bpkcwgm.com/46
<a href= http://2.dxjeobmy.com/1m >Colloidal Silver Ear Infection</a>
http://2.qvxsvpt.com/3u
<a href= http://3.wjgdsgshc.com/4a >Gold Bar Value</a>
http://8.tquhrl.com/2q
<a href= http://7.vxgmjn.com/43 >Eli Lilly Employment</a>
http://0.osflja.com/1c
<a href= http://6.fenhhl.com/3u >Playroom Storage Ideas</a>
http://7.lgccche.com/3a
<a href= http://8.wusrahozy.com/5 >Florida Rehab Centers</a>
http://1.ycpfunvso.com/3u
<a href= http://5.mssnys.com/6 >Blue Ridge Savings</a>
http://3.icrrwj.com/45
<a href= http://6.rtpwdlulh.com/2j >New Homes Ocala</a>
http://6.jeetpt.com/3
<a href= http://9.wswllfcm.com/2s >Murfreesboro Athletic Club</a>
http://6.whjvcqd.com/22
<a href= http://3.uwibpf.com/1p >Santiago De Compestela</a>
http://2.iaxfdc.com/r
<a href= http://1.bzvatcsn.com/3p >Holding Hands Picture</a>
http://6.bpkcwgm.com/1e
<a href= http://0.dxjeobmy.com/2b >Inventory Converting Software</a>
http://3.qvxsvpt.com/w
<a href= http://6.wjgdsgshc.com/c >Camero Action Photos</a>
http://8.tquhrl.com/3y
<a href= http://0.vxgmjn.com/3p >Libery Baptist Church</a>
http://3.osflja.com/21
Name
E-mail
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

    ON THIS PAGE
    SEARCH
    CATEGORIES
    ARCHIVES
    BLOGROLL

Designed by NUKEATION STUDIOS