VB.Net
  Home arrow VB.Net arrow Page 2 - 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  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 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 / 39
    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
     
     
    ADVERTISEMENT


    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
    <Assembly:AssemblyVersion(“1.0.24.0”)>
    <Assembly:AssemblyKeyFile(“..\..\Keyfilename.snk”)>

    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.

    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-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek