June 2008
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
Search

 
Catagories
Archives
Recent Entries
Links
RSS
generating strong names for assemblies
Catagory: programming · This Entry · Comment(0) · eMail entry · Google
March 22, 2004 12:58 PM

programming

Signing Assemblies

You can sign an assembly in two different, but complementary ways: with a strong name or using the File Signing Tool (Signcode.exe). Signing an assembly with a strong name adds a public key encryption to the file containing the assembly manifest. Strong name signing ensures name uniqueness, prevents name spoofing and provides callers with some identity when a reference is resolved.


To sign an assembly with a strong name :

Use the Strong Name Tool (Sn.exe) to generate a key file containing a key pair.
Add strong name attributes to the AssemblyInfo file created automatically with .NET projects. You can edit this file by double clicking its name in the Solution Explorer.

The following example uses delay signing to create a strong-named assembly with a public key file called myKey.snk.

<Assembly: AssemblyKeyFile("myKey.snk")>
<Assembly: AssemblyDelaySign(True)>

Note Assembly-level attributes are ignored if you are not creating an assembly, such as when compiling from the command line using the /target:module option.

http://support.microsoft.com/default.aspx?scid=kb;en-us;815808

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconinstallingassemblyintoglobalassemblycache.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconglobalassemblycache.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfglobalassemblycacheutilitygacutilexe.asp





Comments

Post a comment
Name:


Email Address:


URL:


Comments: