----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: SitaramanM Message 7 in Discussion Hi Thought i would explain why u need a public key before going into how to specify it in the config file. The CLR uses public key technology both to uniquely identify the developer of a component and to protect the component from being tampered with once it is out of the original developer's hands. Each assembly can have a public key embedded in its manifest that identifies the developer. Assemblies with public keys also have a digital signature that is generated before the assembly is first shipped that provides a secure hash of the assembly manifest, which itself contains hashes of all subordinate modules. This ensures that once the assembly ships, no one can modify the code or other resources contained in the assembly. This digital signature can be verified using only the public key; however, the signature can be generated only with the corresponding private key, which organizations must guard more closely than their source code. The current builds of the CLR use RSA public/private keys and Secure Hash Algorithm (SHA) hashing to produce the digital signature. Although the private key used to sign the assembly is a unique fingerprint for each organization, it does not provide the same level of nonrepudiation that digital certificates provide. For example, there is no way to look up the developer's identity based solely on an assembly's public key. The CLR does provide support for embedding digital certificates into assemblies, which is another story altogether That said, from a developer's point of view, any Assembly being placed in GAC has to have a strong name. For this, i guess, you would have used the sn.exe, to create a snk file and added the reference of the AssemblyInfo.vb file, before placing the assembly in the GAC . Right!!! This is the key that you have to specify in the config file. As a general recopmmendation, if you are not sure as to the values tht you should use for the Name, Version, Culture, Public Key of an assembly to specify in the Config File, the best way to get it is, using the GACUtil. After registering your "MyAssembly" in the GAC, Open the Visual Studio.Net Command Prompt(Start->Program Files->MS VS.Net->VS.Net Tools-> Command Prompt), and type the command GacUtil /l. This will list you the entire GAC contents. A sample could be c:\>GACUtuil /l ... ... " HelloWorldModuleForGAC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=39e90f71db1d7207, Custom=null" ... ... Here you see that all the information of the GAC Assembly is listed. One problem in using GACUtil/l is that the output is lengthy(all the GAC Assemblies are listed. Use a shortcut instead. If your Assembly Name is MyAssembly Use GACUtil /l | Find "MyAssembly" (Pipe the output of GACtil to the Find command) This should list only those assemblies which have MyAssembly in the AssemblyName :) hth regards, sr ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/BDotNet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
