Return to
HomePageASPNET2SecurityFAQs
Question: How do I strong-name an ASP.NET application assembly?
Answer:
You can create strong name keys and strong name the assembly using Visual Studio 2005. In the project properties of the assembly, select the
Signing pane. By checking the
"Sign the assembly" checkbox, you instruct the compiler to sign the assembly with the key file specified.
Strong naming .NET assembly guarantees name uniqueness, protects the version lineage and provides strong integrity check.
Note: Strong names do not imply a level of trust like that provided, by a digital signature and supporting certificate.
Here is how you strong name a .Net assembly.
* Configure the assembly for strong naming
* In the Solution Explorer select the .NET assembly project and right click
* On the popup menu select
Properties * It will open the Project Designer page; on it select the
Signing tab.
* On the
Signing tab select the
Sign the assembly check box.
* Create / Select existing strong name key for signing - You can either select an existing or create a new password protected (.pfx) or plain (.snk) strong name key
* For creating new strong name key
* In the
Choose a strong name key file: drop down box select
<New…> * In the
Create Strong Name key dialog enter the
Key file name * Select
Protect my key file with a password check box for creating the .pfx file, else keep it unselected for creating plain strong name key file (.snk)
* If you have selected to protect the file, enter password in
Enter password and
Confirm password text boxes and then click
Ok * For selecting existing strong name key
* In the
Choose a strong name key file: drop down box select
<Browse…> * In the file selection dialog box browse to the strong name key (either .pfx or .snk)
* Select the key file, in case of .pfx it will prompt for password, enter the correct password and click ok on
ImportPFXKeyDlg dialog box.
* Sign the assembly - Now you just need to build the assembly, the complier will build a strong named assembly using the strong name key configured.
Return to
HomePageASPNET2SecurityFAQs