VB.Net
  Home arrow VB.Net arrow Building Assemblies with VB.Net
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Download TestComplete 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM Rational Software Development Conference
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VB.NET

Building Assemblies with VB.Net
By: Shekar Krishna
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 34
    2003-10-16

    Table of Contents:
  • Building Assemblies with VB.Net
  • How to Build a Strong Name Assembly
  • Signing of the Assembly and Preventing Tampering

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    Save your reputation with your customers. Learn how you can have embedding success with Advantage Database Server (ADS).

    Building Assemblies with VB.Net
    (Page 1 of 3 )

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

    This article discusses how to build assemblies and secure them from being tampered with.  Every assembly built using the .NET compiler has a four-part name consisting of the following elements:

    1. Friendly name
    2. Version number
    3. Culture setting
    4. Public key or public key token

    The first part is a friendly name Like MyAssembly.

    The second part is the version number say 1.0.5.0. These four numbers represent the major version, minor version, build number, and revision number respectively.  The assembly can be built with a specific version number by placing the following code at the top of any of the project source files:

    Imports System.Reflection
    <Assembly: AssemblyVersion (“1.0.24.0”)>

    The AssemblyVersion attribute is defined in the System.Reflection namespace. If no version number is specified, the compiler assigns a version number of 0.0.0.0.

    The third part is the culture setting indicating that the assembly has been localized for a particular spoken language.

    The fourth, and the last, part of an assembly name is the public key.  This value is unique and represents a particular company or developer . Two companies should never use the same public key.  The public key occupies 128 bytes and is stored as a binary format in a key file. It can also be written using a text based hexadecimal format as shown below:

                      00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00  
               00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00  
               CD 79 18 40 51 8C D7 25 A5 49 13 BA 4B 4F CF 34   
               03 4A 7B 6E 17 8E 5C 41 9E 95 EA 78 0B E9 60 5D   
               9D EE 52 24 25 0A 25 90 E0 7D 4A EC 13 90 21 45   
               76 BB AE FB F4 B6 08 1D F4 7B 6C B9 A4 EC 62 AF 
               1F C8 54 B2 92 96 11 B6 B8 9D 41 8C 24 B5 30 10   
               0B 1C F5 1C CA D3 4A 2F D5 59 16 D5 E0 B5 B9 D6  
               68 61 18 4D 3B D0 E7 C4 73 6C 6B DF 41 D0 00 4F   
               A6 E0 9F 98 52 6C 68 FA 1E 86 CA 1D AE CE A5 B7

    Because the public key is so large, a smaller 8 byte value, known as a public key token, is used in its place. The public key token is usually represented by a 16-character hexadecimal string value that looks like this:

    A9 FA E6 01 40 67 F5 F1

    There is a one to one correspondence between a public key value and a public key token -- i.e.: for a specific public key token there is exactly one corresponding public key value.

    More VB.Net Articles
    More By Shekar Krishna


     

    VB.NET ARTICLES

    - 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...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway