|
-
Jul 26th, 2007, 04:49 PM
#1
Thread Starter
PowerPoster
Strong Naming/signing
What is the procedure to Strong Name/sign an assembly?
I have managed to create a strongname key using sn -k keyfile.snk
I added this in the assemblyinfo.cs:
[assembly: AssemblyKeyFile("..\\..\\keyfile.snk")]
I then compiled the project, compiled fine. Now what?
-
Jul 26th, 2007, 08:06 PM
#2
Re: Strong Naming/signing
The point of strong-naming is to uniquely identify your assembly. No-one can substitute another assembly or edit yours and pass it off as the original. That way no-one can change the way an application works without the user knowing. If the system can't find an assembly with the specific strong name it's looking for then it will not run the app, even if it finds an assembly with the same name, size and interface. That adds a level of security against hackers who would try to change the way an application works by substituting or editing existing assemblies.
The main thing to note now is that if your assembly has a string name then all the assemblies it references must also have string names. You can't trust an assembly your using if it can't trust the assemblies it's using.
-
Jul 27th, 2007, 02:31 AM
#3
Thread Starter
PowerPoster
Re: Strong Naming/signing
I do require this Is the procedure I have written done correctly or do I need to do something else?
I require this to comply with one of the SDK's I am using
-
Jul 27th, 2007, 11:12 AM
#4
Re: Strong Naming/signing
Use it. If you want to go the extra step, do a search on code access security (caspol.exe) and you could also place it in the GAC.
-
Jul 27th, 2007, 06:40 PM
#5
Re: Strong Naming/signing
Are you using VS 2005? Please assume that it is ALWAYS necessary and specify your version in EVERY thread. If you are then you don't need to muck about with any code. Just open the Signing tab of the project properties and click the appropriate box. You can then create a new key file or select an existing one.
-
Jul 27th, 2007, 07:19 PM
#6
Thread Starter
PowerPoster
Re: Strong Naming/signing
Thanks, this is for .NET 1.1 (VS2003)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|