jump to navigation

Strong name pairs February 2, 2008

Posted by wesaday in Programming.
Tags: , ,
trackback

While working out some details, I came upon the need to generate a strong name pair using sn.exe. I couldn’t get it to work. I kept getting an error that said that there was an error generating the strong name pair mostly because “access denied”. WTF? I searched and searched. Found lots of people with the same problem but none of the solutions worked for me. Most of the “recent” posts were concerning Visual Studio 2005 and not having read permission on a directory. That bit of information didn’t do me any good since I am using VS 2008 on Vista and that directory doesn’t exist!

 So, what I ended up doing was piecing the various bits together and working around this problem. The directory that needed to be modified was in a ProgramData directory that oddly enough doesn’t show up in explorer. I had to search for a “MachineKeys” directory. Even then I couldn’t do anything with it. Was still getting “Access denied” trying to change the permissions. I even tried using Icacls.exe to change it with no success. The real fix was to go into the properties and selected the Security tab and give yourself permissions. Explorer gave me an error when applying the settings but took them anyway.

After that, sn.exe worked fine for me.

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: