Home arrow VB.Net arrow Page 2 - Building Assemblies with VB.Net

Building Assemblies with VB.Net

Shekar's article is a brief introduction into the world of Assemblies, using VB.Net, and their core security features.

Author Info:
By: Shekar Krishna
Rating: 4 stars4 stars4 stars4 stars4 stars / 53
October 16, 2003
  1. · Building Assemblies with VB.Net
  2. · How to Build a Strong Name Assembly
  3. · Signing of the Assembly and Preventing Tampering

print this article

Building Assemblies with VB.Net - How to Build a Strong Name Assembly
(Page 2 of 3 )

An assembly is said to have a strong name when it has a public key and a digital signature. This protects the assembly from being tampered with.

The first step to building an assembly with a strong name is to get a pair of public-private key pair.  The public key is written into the physical image of the assembly. The private key is used to generate digital signatures.  The key is generated using the .NET framework strong name utility, SN.exe, by specifying the –k switch and the target key file from the command line.

SN.exe –k keyfilename.snk

This key file can be used by several different assembly projects. 

The next step is to add the following code at the top of one of the source files in a project:

Imports System.Reflection

When the project is built, an assembly with a strong name is generated. The compiler records the full 128 byte value into the manifest of the assembly file it outputs. The compiler uses the private key to generate the digital signature.

blog comments powered by Disqus

- MyClass - Implementing Polymorphism in VB.Net
- Building a News Ticker Using VB.Net
- Everything You Wanted to Know About Forms In...
- Building Assemblies with VB.Net
- Simple VB.NET Notify Icon with Panel Applica...
- Regular Expressions in .NET
- String Encryption With Visual Basic .NET
- Deploying Applications in VB.NET: Part 1/2
- Watching Folder Activity in VB.NET
- Creating A Windows Service in VB.NET
- Implementing The Google Web Service In VB.NET
- Migrating to Visual Basic.NET from Visual Ba...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials